我有一个旋转木马,我希望我的旋转木马尺寸变成80 * 60。我能做到吗?
<div id="mycarousel2" class="carousel slide" data-ride="carousel">
<div class="carousel-inner">
<div class="item active">
<img src="IMG1.png" alt="..." class="img-responsive">
</div>
<div class="item">
<img src="IMG2.png" alt="..." class="img-responsive">
</div>
<div class="item">
<img src="IMG3.png" alt="..." class="img-responsive">
</div>
</div>
</div>
答案 0 :(得分:0)
您可以将其包装在一个小块80 x 60
中Bootply :http://www.bootply.com/bHdeZhS30z
<强> HTML 强>
<div class="small-block">
<div id="mycarousel2" class="carousel slide" data-ride="carousel">
<div class="carousel-inner">
<div class="item active">
<img src="IMG1.png" alt="..." class="img-responsive">
</div>
<div class="item">
<img src="IMG2.png" alt="..." class="img-responsive">
</div>
<div class="item">
<img src="IMG3.png" alt="..." class="img-responsive">
</div>
</div>
</div>
</div>
<强> CSS 强>
.small-block{
width:80px;
height:60px;
background: cyan;
}
答案 1 :(得分:0)
<强> CSS 强>
.carousel-inner{
width:80px;
height:60px;
overflow:hidden;
}
.carousel-inner img{
width:80px;
height:auto;
}