首页 > 代码库 > bootstrap图片轮播

bootstrap图片轮播

<div class="carousel slide" id="myCarsousel" style="width:790px;">
<ol class="carousel-indicators">
<li data-target="#myCarsousel" data-side-to="0" class="active"></li>
<li data-target="#myCarsousel" data-side-to="1" ></li>
<li data-target="#myCarsousel" data-side-to="2" ></li>
</ol>
<div class="carousel-inner">
<div class="item active">
<img src="http://www.mamicode.com/img/1.png" />
<div class="carousel-caption">
<h3>标题</h3>
<p>图片信息区</p>
</div>
</div>
<div class="item">
<img src="http://www.mamicode.com/img/2.png" />
</div>
<div class="item">
<img src="http://www.mamicode.com/img/3.png" />
</div>
</div>
<a href="http://www.mamicode.com/#myCarsousel" class="carousel-control left" data-slide="prev"><span class="glyphicon glyphicon-chevron-left"></span></a>
<a href="http://www.mamicode.com/#myCarsousel" class="carousel-control right" data-slide="next"><span class="glyphicon glyphicon-chevron-right"></span></a>
</div>

bootstrap图片轮播