[英]bootstrap carousel not working in firefox
在我的網站上,輪播滑塊上有問題,它僅適用於chrome,不適用於mozilla
我的實時網站網址是: http : //www.umzug-preise.com/home
我使用了如下代碼。
<header id="myCarousel" class="carousel slide">
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
<li data-target="#myCarousel" data-slide-to="1"></li>
<li data-target="#myCarousel" data-slide-to="2"></li>
</ol>
<!-- Wrapper for Slides -->
<div class="carousel-inner">
<div class="item active">
<!-- Set the first background image using inline CSS below. -->
<div class="fill" style="background:url(images/slider1.jpg);"></div>
</div>
<div class="item">
<!-- Set the second background image using inline CSS below. -->
<div class="fill" style="background:url(images/slider2.jpg);"></div>
</div>
<!-- <div class="item">
<div class="fill" style="background:url(images/slider1.jpg);"></div>
</div>-->
</div>
<!-- Controls -->
<a class="left carousel-control" href="#myCarousel" data-slide="prev">
<span class="icon-prev"></span>
</a>
<a class="right carousel-control" href="#myCarousel" data-slide="next">
<span class="icon-next"></span>
</a>
</header>
問題是容器的高度。 .fill
類沒有固定的高度。 所以.carousel-inner
具有height: auto
正在獲取height = 0
。 這在IE上也不起作用,我認為幸運的是它在chrome上有效。 你需要設置
.carousel-inner{
height: 100%;
}
就我而言,我通過刪除(或注釋掉)以下bootstrap.css
行來解決此問題:
-webkit-perspective: 1000px;
perspective: 1000px;
在類.carousel-inner > .item
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.