bootstrap轮播图代码
时间: 2023-07-09 12:25:06 浏览: 87
以下是一个简单的 Bootstrap 轮播图代码:
```
<div id="myCarousel" class="carousel slide" data-ride="carousel">
<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">
<img src="img/slide1.jpg" alt="Slide 1">
<div class="carousel-caption">
<h3>Slide 1</h3>
<p>Some text for slide 1 goes here...</p>
</div>
</div>
<div class="item">
<img src="img/slide2.jpg" alt="Slide 2">
<div class="carousel-caption">
<h3>Slide 2</h3>
<p>Some text for slide 2 goes here...</p>
</div>
</div>
<div class="item">
<img src="img/slide3.jpg" alt="Slide 3">
<div class="carousel-caption">
<h3>Slide 3</h3>
<p>Some text for slide 3 goes here...</p>
</div>
</div>
</div>
<a class="left carousel-control" href="#myCarousel" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left"></span>
</a>
<a class="right carousel-control" href="#myCarousel" data-slide="next">
<span class="glyphicon glyphicon-chevron-right"></span>
</a>
</div>
```
你可以根据需要修改轮播图的图片和文字内容。
阅读全文