Bootstrap的js插件之轮播(carousel)
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了Bootstrap的js插件之轮播(carousel),小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含2215字,纯文字阅读大概需要4分钟。
内容图文
![Bootstrap的js插件之轮播(carousel)](/upload/InfoBanner/zyjiaocheng/1083/1c580828f0b7452286194088e1566db0.jpg)
轮播请查看以下示例,基本已经涵盖最常用的一个轮播
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1"> <title>js插件_轮播</title> <link rel="stylesheet" href="css/bootstrap.min.css" type="text/css"> <!--<link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css">--> <script src="js/jquery-1.11.1.min.js"></script> <script src="js/bootstrap.min.js"></script> <style type="text/css"> .myCarousel{ width:50%; } </style> </head> <body> <div class="container myCarousel"> <div id="carousel-example-generic" class="carousel slide"> <ol class="carousel-indicators"> <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li> <li data-target="#carousel-example-generic" data-slide-to="1" ></li> <li data-target="#carousel-example-generic" data-slide-to="2" ></li> </ol> <div class="carousel-inner"> <div class="item active"> <img src="images/1.jpg"/> <div class="carousel-caption"> <h3>宅男女神1</h3> <p>人气偶像票选890张</p> </div> </div> <div class="item"> <img src="images/2.jpg"/> <div class="carousel-caption"> <h3>宅男女神2</h3> <p>人气偶像票选1234张</p> </div> </div> <div class="item"> <img src="images/3.jpg"/> <div class="carousel-caption"> <h3>宅男女神3</h3> <p>人气偶像票选7836张</p> </div> </div> </div> <a class="left carousel-control" href="#carousel-example-generic" data-slide="prev"> <span class="glyphicon glyphicon-chevron-left"></span> </a> <a class="right carousel-control" href="#carousel-example-generic" data-slide="next"> <span class="glyphicon glyphicon-chevron-right"></span> </a> </div> </div> <script> //设置图片切换时间,默认是5秒; $(".carousel").carousel({ interval:2000 }) </script> </body> </html>
![技术分享](/upload/getfiles/default/2022/11/11/20221111075037805.jpg)
版权声明:本文为博主原创文章,未经博主允许不得转载。
原文:http://blog.csdn.net/bboyjoe/article/details/47348099
内容总结
以上是互联网集市为您收集整理的Bootstrap的js插件之轮播(carousel)全部内容,希望文章能够帮你解决Bootstrap的js插件之轮播(carousel)所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。