Prev Demo
Carousel Wrap With Data Attribute
Next Demo
Write code here
J
|
B
|
A
<!DOCTYPE html> <html lang="en"> <head> <title>Bootstrap Example</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script> <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script> <style> .carousel-inner > .item > img, .carousel-inner > .item > a > img { width: 70%; margin: auto; } </style> </head> <body> <div class="container"> <div id="#mycarousel" class="carousel slide" data-wrap="false" data-interval="500" data-ride="carousel"> <h2>Bootstrap carousel slide with wrap using data-attribute</h2> <ol class="carousel-indicators"> <li data-target="#mycarousel" data-slide="0" class="active"></li> <li data-target="#mycarousel" data-slide="1"></li> <li data-target="#mycarousel" data-slide="2"></li> <li data-target="#mycarousel" data-slide="3"></li> </ol> <div class="carousel-inner" role="listbox"> <div class="item active"> <img src="http://www.techfunda.com/HTPictures/Generics/4-635880948886969785.jpg" height="200" width="100" /> </div> <div class="item"> <img src="http://www.techfunda.com/HTPictures/Generics/4-635981168904289706.jpg" height="200" width="100" /> </div> <div class="item"> <img src="http://www.techfunda.com/HTPictures/Generics/4-635984457292693374.jpg" height="200" width="100" /> </div> <div class="item"> <img src="http://www.techfunda.com/HTPictures/Generics/4-635984457852724489.jpg" height="200" width="100" /> </div> </div> <a class="left carousel-control" href="#mycarousel" role="button" data-slide="prev"> <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span> <span class="sr-only"></span> </a> <a class="right carousel-control" href="#mycarousel" role="button" data-slide="Next"> <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span> <span class="sr-only"></span> </a> </div> </div> </body> </html>
Note: We DO NOT save your trial code in our database.
Output