Bootstrap轮播图学习使用
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了Bootstrap轮播图学习使用,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含1866字,纯文字阅读大概需要3分钟。
内容图文
本文实例为大家分享了Bootstrap轮播图的具体代码,供大家参考,具体内容如下
<!doctype html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title></title> <link rel="stylesheet" href="css/bootstrap.css" rel="external nofollow" /> <style> #pic{ width:900px; margin:0 auto; } .carousel-caption{ color:#f00; } </style> </head> <body> <!--carousel中文译为轮播,旋转木马 slide给图片添加运动效果; data-interval是间隔时间,不能低于400否则易出问题,单位为ms即毫秒; data-ride="carousel为页面一加载就开始轮播图片 carousel-caption是在图片上放置文字--> <div class="container"> <div id="pic" class="carousel slide" data-interval="2000" data-ride="carousel"> <!--小圆点--> <ol class="carousel-indicators"> <li class="active"></li> <li></li> <li></li> <li></li> </ol> <!--轮播的图片--> <div class="carousel-inner"> <div class="item active"> <img src="images/1.jpg"/> <div class="carousel-caption"> <h4>标题1</h4> <p>xxxxxxxxxxxxxxxxxxxx</p> </div> </div> <div class="item"> <img src="images/2.jpg"/> <div class="carousel-caption"> <h4>标题2</h4> <p>xxxxxxxxxxxxxxxxxxxx</p> </div> </div> <div class="item"> <img src="images/3.jpg"/> <div class="carousel-caption"> <h4>标题3</h4> <p>xxxxxxxxxxxxxxxxxxxx</p> </div> </div> <div class="item"> <img src="images/4.jpg"/> <div class="carousel-caption"> <h4>标题4</h4> <p>xxxxxxxxxxxxxxxxxxxx</p> </div> </div> </div> <!--左右按钮--> <a href="#pic" rel="external nofollow" rel="external nofollow" class="carousel-control left" data-slide="prev">?</a> <a href="#pic" rel="external nofollow" rel="external nofollow" class="carousel-control right" data-slide="next">?</a> </div> </div> <script src="js/jquery-2.1.0.js"></script> <script src="js/bootstrap.js"></script> </body> </html>
Bootstrap轮播图的效果:
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持脚本之家。
内容总结
以上是互联网集市为您收集整理的Bootstrap轮播图学习使用全部内容,希望文章能够帮你解决Bootstrap轮播图学习使用所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。