我成功地启动了bootstrap 4滚动条。我也有一个Bootstrap 4轮播工作。但是,当我将它们放到一个索引文件中时,轮播似乎取消了滚动浏览,并且完全停止工作。
我非常新手,无法弄清楚如何让他们一起工作。我在想与javascript有关。他们互相压倒了吗?
<div id="carouselExampleIndicators" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#carouselExampleIndicators" data-slide-to="0" class="active"></li>
<li data-target="#carouselExampleIndicators" data-slide-to="1"></li>
<li data-target="#carouselExampleIndicators" data-slide-to="2"></li>
<li data-target="#carouselExampleIndicators" data-slide-to="3"></li>
</ol>
<div class="carousel-inner">
<div class="carousel-item active">
<img class="d-block w-90" src="images/slide1.jpg" alt="First slide">
</div>
<div class="carousel-item">
<img class="d-block w-90" src="images/slide2.jpg" alt="Second slide">
</div>
<div class="carousel-item">
<img class="d-block w-90" src="images/slide3.jpg" alt="Third slide">
</div>
<div class="carousel-item">
<img class="d-block w-90" src="images/slide4.jpg" alt="Third slide">
</div>
</div>
<a class="carousel-control-prev" href="#carouselExampleIndicators" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#carouselExampleIndicators" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>