在我的站点中,旋转木马 slider 存在问题,它仅适用于 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
类没有固定高度。因此,具有 height: auto
的 .carousel-inner
得到 height = 0
。这也不适用于 IE,我认为幸运的是它适用于 chrome。你需要设置
.carousel-inner{
height: 100%;
}
关于javascript - Bootstrap 轮播在 Firefox 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35032978/