set image max-height

This commit is contained in:
wlx 2013-04-09 14:58:03 +00:00
parent 43c5c43f01
commit 4119bd1e9e
2 changed files with 18 additions and 4 deletions

View File

@ -2,7 +2,7 @@
$this->headTitle($this->config->title->site);
$this->headTitle('首页');
$this->headTitle()->setSeparator(' - ');
//$this->theme->AppendPlus($this,'slides');
$this->theme->AppendPlus($this,'slides');
$auth = Zend_Auth::getInstance();
$this->headLink()->appendStylesheet('/css/index.css');
?>
@ -17,6 +17,20 @@
</ul>
</div>
<div class="span7">
<!--<div id="slides">
<?php
/*foreach($this->news as $k=>$v)
{
echo '<div class="slide">'.
'<div class="thumb"><a href="'.$v['url'].'" title="'.$v['description'].'" ><img src="'.$v['image'].'" class="img-rounded" /></a></div>'.
'<div class="content">'.
'<div class="description"><h5><a href="'.$v['url'].'" style="color:#FFF;">'.$v['title'].'</a><span class="pull-right">['.date("Y-m-d",strtotime($v['ts_published'])).']</span></h5>'.
'</div>'.
'</div>'.
'</div>';
}*/
?>
</div> -->
<div id="myCarousel" class="carousel slide">
<ol class="carousel-indicators">
<?php
@ -31,7 +45,7 @@
foreach($this->news as $k=>$v)
{
echo '<div class="item'.($k==0?' active':'').'">';
echo '<a href="'.$v['url'].'" title="'.$v['description'].'" ><img src="'.$v['image'].'" class="img-rounded" /></a>';
echo '<a href="'.$v['url'].'" title="'.$v['description'].'" ><img src="'.$v['image'].'" class="thumb img-rounded" /></a>';
echo '<div class="carousel-caption">';
echo '<h4><a href="'.$v['url'].'">'.$v['title'].'</a><span class="pull-right">['.date("Y-m-d",strtotime($v['ts_published'])).']</span></h4>';
echo '<p>'.$v['description'].'</p></div></div>';

View File

@ -98,8 +98,8 @@
}
.slide .thumb{
width:100%;
height:330px;
/*width:100%;*/
max-height:330px;
text-align:center;
}