在本教程中,这段代码似乎运行正常,但是当我在index.html中实现时,Next和Prev Chevron图标出现在Slider下面,而不是滑块上。参见随附的截图,你可以看到左下角的小按钮。这是什么问题?是否缺少任何Bootstrap类?
<div class="carousel slide" id="gallery-carousel" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#gallery-carousel" data-slide-to="0" class="active"></li>
<li data-target="#gallery-carousel" data-slide-to="1"></li>
<li data-target="#gallery-carousel" data-slide-to="2"></li>
</ol>
<div class="carousel-inner">
<div class="item active">
<img src="images/slide1.jpg" alt="Slider image">
<div class="carousel-caption">This is a caption.</div>
</div>
<div class="item">
<img src="images/slide2.jpg" alt="Slider image">
<div class="carousel-caption">This is a caption.</div>
</div>
<div class="item">
<img src="images/slide3.jpg" alt="Slider image">
<div class="carousel-caption">This is a caption.</div>
</div>
<a href="#gallery-carousel" clsas="left carousel-control" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left"></span>
</a>
<a href="#gallery-carousel" clsas="right carousel-control" data-slide="next">
<span class="glyphicon glyphicon-chevron-right"></span>
</a>
</div>
答案 0 :(得分:0)
更改:
<a href="#gallery-carousel" clsas="left carousel-control" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left"></span>
</a>
<a href="#gallery-carousel" clsas="right carousel-control" data-slide="next">
<span class="glyphicon glyphicon-chevron-right"></span>
</a>
有关:
<a href="#gallery-carousel" class="left carousel-control" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left"></span>
</a>
<a href="#gallery-carousel" class="right carousel-control" data-slide="next">
<span class="glyphicon glyphicon-chevron-right"></span>
</a>
类属性拼写错误