具体可以参考:
一、轮播图<div id="myCarousel" class="carousel slide"> <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> <div class="carousel-inner"> <div class="item active" style="background:#223240;"> <a href="#"><img src="img/slide1.png" alt="第一张"></a> </div> <div class="item" style="background:#F5E4DC;"> <a href="#"><img src="img/slide2.png" alt="第二张"></a> </div> <div class="item" style="background:#DE2A2D;"> <a href="#"><img src="img/slide3.png" alt="第三张"></a> </div> </div> <a href="#myCarousel" data-slide="prev" class="carousel-control left"> <span class="glyphicon glyphicon-chevron-left"></span> </a> <a href="#myCarousel" data-slide="next" class="carousel-control right"> <span class="glyphicon glyphicon-chevron-right"></span> </a> </div>