Posted in Javascript onDecember 20, 2016
本文实例为大家分享了bootstrap轮播的具体代码,供大家参考,具体内容如下
<!DOCTYPE html> <html> <head> <title>轮播</title> <link rel="stylesheet" href="https://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css"> <style> #circleContent{ width:150px; height:150px; } </style> <script src="https://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script> <script src="https://cdn.static.runoob.com/libs/bootstrap/3.3.7/js/bootstrap.min.js"></script> <script> $(document).ready(function(){ $('#circleContent').carousel({interval:5000});//每隔5秒自动轮播 }); </script> </head> <body> <div id="circleContent" class="carousel slide"> <ol class="carousel-indicators"> <li data-target="#circleContent" data-slide-to="0" class="active"></li> <li data-target="#circleContent" data-slide-to="1"></li> <li data-target="#circleContent" data-slide-to="2"></li> </ol> <div class="carousel-inner"> <div class="item active"> <img src="images/circle1.png"> <div class="carousel-caption">IMG1</div> </div> <div class="item"> <img src="images/circle2.png"> <div class="carousel-caption">IMG2</div> </div> <div class="item"> <img src="images/circle3.png"> <div class="carousel-caption">IMG3</div> </div> </div> <a class="carousel-control left" href="#circleContent" data-slide="prevent">‹</a> <a class="carousel-control right" href="#circleContent" data-slide="next">›</a> </div> </body> </html>
如果大家还想深入学习,可以点击这里进行学习,再为大家附4个精彩的专题:
精彩专题分享:jQuery图片轮播 JavaScript图片轮播 Bootstrap图片轮播
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持三水点靠木。
bootstrap实现每隔5秒自动轮播效果
- Author -
lijiao声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Reply on: @reply_date@
@reply_contents@