"carousel"
Bootstrap 3.2.0 Snippet by hooili

<link href="//netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//netdna.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class="container"> <div class="row"> <div id="myCarousel" class="carousel slide"> <!-- Dot Indicators --> <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> <!-- Items --> <div class="carousel-inner"> <div class="active item"> <img src="//placehold.it/1300x500" class="img-responsive"></div> <div class="item"> <img src="//placehold.it/1300x500" class="img-responsive"></div> <div class="item"> <img src="//placehold.it/1300x500" class="img-responsive"></div> </div> <!-- Navigation --> <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> </div> </div>
.carousel { overflow: hidden; } .carousel .item { -webkit-transition: opacity 1s; -moz-transition: opacity 1s; -ms-transition: opacity 1s; -o-transition: opacity 1s; transition: opacity 1s; } .carousel .active.left, .carousel .active.right { left:0; opacity:0; z-index:2; } .carousel .next, .carousel .prev { left:0; opacity:1; z-index:1; } .item:nth-child(1) { background: darkred; } .item:nth-child(2) { background: red; } .item:nth-child(3) { background: orange; }
$(document).ready(function() { $('.carousel').carousel({interval: 2000}); });

Related: See More


Questions / Comments: