bootstrap图片轮播

时间:2024-01-12 16:06:38

<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="img/1.png" />
<div class="carousel-caption">
<h3>标题</h3>
<p>图片信息区</p>
</div>
</div>
<div class="item">
<img src="img/2.png" />
</div>
<div class="item">
<img src="img/3.png" />
</div>
</div>
<a href="#myCarsousel" class="carousel-control left" data-slide="prev"><span class="glyphicon glyphicon-chevron-left"></span></a>
<a href="#myCarsousel" class="carousel-control right" data-slide="next"><span class="glyphicon glyphicon-chevron-right"></span></a>
</div>