Bootstrap Carousel指标在每次幻灯片更改时都没有变化,我已经按照相同的步骤从在线tuitorial不知道哪里是我的错误并按照SO中的答案但没有运气。
请找到以下代码
HTML:
a
答案 0 :(得分:0)
我认为您需要在内部移动指标,如下所示
<div id="newSlider" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#newSlider" data-slide-to="0" class="active"></li>
<li data-target="#newSlider" data-slide-to="1"></li>
</ol>
<div class="carousel-inner" role="listbox">
<div class="item active">
<img src="http://www.stockpilingmoms.com/wp-content/uploads/2016/04/15-Earth-Day-Tips-and-Ideas.jpg" alt="aa">
<div class="carousel-caption">
<h1>aa</h1>
</div>
</div>
<div class="item">
<img src="https://s-media-cache-ak0.pinimg.com/736x/0e/ba/fc/0ebafc5f55ba75f0ec7c48c076bb9506.jpg" alt="bb">
<div class="carousel-caption">
<h1>bb</h1>
</div>
</div>
</div>
<a class="left carousel-control" href="#newSlider" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left"></span>
</a>
<a class="right carousel-control" href="#newSlider" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right"></span>
</a>
</div>