我在item carousel中使用了background-image。背景属性是:覆盖中心和固定。它适用于桌面,但不适用于iphone(是的,适用于Android)。在这个设备上,设备不适合屏幕,只显示图像的一小部分,我不知道为什么......
.carousel-inner .item
{
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
-webkit-background-position: center;
-moz-background-position: center;
-o-background-position: center;
background-position: center;
-webkit-background-attachment: fixed;
-moz-background-attachment: fixed;
-o-background-attachment: fixed;
background-attachment: fixed;
}
HTML:
<div class="item slideimg3">
<div class="carousel-caption">
<h1>Lorem ipsus</h1>
<p>Etiam tellus felis, fringilla vitae dictum id, dapibus id est.</p>
</div>
</div>