"Carousel bootstrap 3 with 2.3.2 style and swipe compatibility"
Bootstrap 3.0.3 Snippet by ErikAlserda

<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.3/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" style="max-width: 900px; margin: 0px auto;"> <ol class="carousel-indicators hidden-xs hidden-sm" style="padding-bottom: 42px;"> <li data-target="#carcousel-example-generic" data-slide-to="0" class="active"></li> <li data-target="#carcousel-example-generic" data-slide-to="1"></li> <li data-target="#carcousel-example-generic" data-slide-to="2"></li> </ol> <div class="carousel-inner"> <div class="active item" align="center"><a href="#"><img src="http://lorempixel.com/1920/1080/city/" class="img-rounded" alt="PS3 reparatie Haarlem"></a> <div class="carousel-caption"> <h3>Cupcake ipsum dolor sit amet</h3> <p>Powder chocolate carrot cake. Applicake tart icing chupa chups marshmallow apple pie candy canes gingerbread croissant.</p> </div> </div> <div class="item" align="center"><a href="#"><img src="http://lorempixel.com/1920/1080/nature/" class="img-rounded" alt="Blu-ray Lens reparatie"></a> <div class="carousel-caption"> <h3>Cupcake ipsum dolor sit amet</h3> <p>Pudding fruitcake chocolate pastry caramels dessert powder cupcake. Marzipan sweet roll jelly macaroon brownie.</p> </div> </div> <div class="item" align="center"><a href="#"><img src="http://lorempixel.com/1920/1080/food/" class="img-rounded" alt="Yellow Light of Death"></a> <div class="carousel-caption"> <h3>Cupcake ipsum dolor sit amet</h3> <p>Ice cream pie marzipan cookie macaroon dragée cookie. Caramels tootsie roll danish chocolate cake pastry icing.</p> </div> </div> </div> <a class="left carousel-control" href="#myCarousel" data-slide="prev">‹</a> <a class="right carousel-control" href="#myCarousel" data-slide="next">›</a> </div> </div> </div> <script src="//code.jquery.com/mobile/1.4.0/jquery.mobile-1.4.0.min.js"></script> <script> // Add this to let the carousel start automatic $('.carousel').carousel(); </script>
.carousel-control { position: absolute; top: 40%; left: 15px; width: 40px; height: 40px; margin-top: -20px; font-size: 60px; font-weight: 100; line-height: 30px; color: #ffffff; text-align: center; background: #222222; border: 3px solid #ffffff; -webkit-border-radius: 23px; -moz-border-radius: 23px; border-radius: 23px; opacity: 0.5; filter: alpha(opacity=50); } .carousel-control.right { right: 15px; left: auto; } .carousel-caption { position: absolute; right: 0; bottom: 0; left: 0; padding: 15px; background: #333333; background: rgba(0, 0, 0, 0.75); } .carousel-caption p { margin-bottom: 0; } @media screen and (max-width: 700px){ .carousel-caption p { font-size: 13px; } .carousel-caption { background: rgba(0, 0, 0, 0.55); } .carousel-control { top: 20%; } }
$(document).ready(function() { $(".carousel-inner").swiperight(function() { $(this).parent().carousel('prev'); }); $(".carousel-inner").swipeleft(function() { $(this).parent().carousel('next'); }); });

Related: See More


Questions / Comments:

I create my project in vs 2013, i custom my carousel same this example, but i can't drag my carousel left or right. Please help me. Thanks!

Hungtk () - 9 years ago - Reply 0


I've been looking for this. Thanks!

Luke () - 10 years ago - Reply 0


is it possible to have a left or right alignment for the captions?

nextlayers () - 10 years ago - Reply 0


this is impossible

name () - 10 years ago - Reply 0