引导轮播在火狐浏览器中不起作用

bootstrap carousel not working in firefox

本文关键字:火狐浏览器 不起作用      更新时间:2023-09-26

在我的网站上轮播滑块存在问题,它仅适用于 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