How it works
The carousel is a slideshow for cycling through a series of content, built with CSS 3D transforms and a bit of JavaScript. It works with a series of images, text, or custom markup. It also includes support for previous/next controls and indicators.
Basic Example
With controls
Adding in the previous and next controls. We recommend using <button>
elements, but you can also use <a>
elements with role="button"
.
With indicators
You can also add the indicators to the carousel, alongside the controls, too.
With captions
Add captions to your slides easily with the .carousel-caption
element within any .carousel-item
. They can be easily hidden on smaller viewports, as shown below, with optional display utilities. We hide them initially with .d-none
and bring them back on medium-sized devices with .d-md-block
.