Basic Example
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li>
<li data-target="#carousel-example-generic" data-slide-to="1"></li>
<li data-target="#carousel-example-generic" data-slide-to="2"></li>
</ol>
<div class="carousel-inner" role="listbox">
<div class="carousel-item active">
<img src="..." alt="First slide">
</div>
<div class="carousel-item">
<img src="..." alt="Second slide">
</div>
<div class="carousel-item">
<img src="..." alt="Third slide">
</div>
</div>
<a class="carousel-control-prev" href="#carousel-example-generic" role="button" data-slide="prev">
<span class="carousel-control-prev-icon" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="carousel-control-next" href="#carousel-example-generic" role="button" data-slide="next">
<span class="carousel-control-next-icon" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
Interval Option
The amount of time to delay between automatically cycling an item. If false, carousel will not automatically cycle.
Pause Option
If set to
"hover", pauses the cycling of the carousel on
mouseenter and resumes the cycling of the carousel on
mouseleave. If set to
null, hovering over the carousel won't pause it.
Carousel Options
Options can be passed via data attributes or JavaScript. For data attributes, append the option name to
data-, as in
data-interval="".
Optional captions
Add captions to your slides easily with the .carousel-caption element within any .carousel-item.
Wrap Option
Whether the carousel should cycle continuously or have hard stops. Default: true
Keyboard Option
Whether the carousel should react to keyboard events. Default: true