Bootstrap 轮播效果
来源:互联网 发布:小米 网络诊断怎么关闭 编辑:程序博客网 时间:2024/06/07 00:09
一、效果
可自动轮播也可手动
HTML源码(Bootstrap文档中有)
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <link href="css/bootstrap.css" rel="stylesheet"> <link href="x.css" rel="stylesheet"> <script src="js/jquery-3.1.1.min.js"></script> <script src="js/bootstrap.min.js"></script> <script src="x.js"></script></head><body><div class="container"><div id="carousel-example-generic" class="carousel slide" data-ride="carousel"> <!-- Indicators --> <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> <!-- Wrapper for slides --> <div class="carousel-inner" role="listbox"> <div class="item active"> <img src="two.jpg" alt="..."> <div class="carousel-caption"> <h3>msdsdasd</h3> <p>sdsdsdsd</p> </div> </div> <div class="item"> <img src="two.jpg" alt="..."> <div class="carousel-caption"> <h3>msdsdasd</h3> <p>sdsdsdsd</p> </div> </div> </div> <!-- Controls --> <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev"> <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span> <span class="sr-only">Previous</span> </a> <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next"> <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span> <span class="sr-only">Next</span> </a></div></div></body></html>
CSS自定义源码(更改该区域大小)
.img-responsive, .thumbnail > img, .thumbnail a > img, .carousel-inner > .item > img, .carousel-inner > .item > a > img{ height: 500px; width: 100%;}
三、JS自定义源码
/** * Created by Administrator on 2017/5/5. */$('#carousel-example-generic').on('slide.bs.carousel', function () { $('.carousel').carousel('cycle');})
1 0
- Bootstrap 轮播效果
- bootstrap 轮播效果
- bootstrap图片轮播+导航栏效果
- 全面解析Bootstrap图片轮播效果
- 让 Bootstrap 轮播效果支持左右滑动手势
- 57-001-1 bootstrap实现图片轮播效果
- 基于bootstrap的图片轮播效果展示
- 让 Bootstrap 轮播效果支持左右滑动手势
- Bootstrap 轮播
- bootstrap 轮播总结
- Bootstrap轮播
- bootstrap图片轮播
- bootstrap 轮播
- Bootstrap图片轮播
- Bootstrap图片轮播
- Bootstrap 旋转轮播
- 【BootStrap】图片轮播
- BootStrap 轮播插件
- android contentprovider 插件化之二
- 心有灵犀一点通——从『灵犀语音助手』漫谈人工智能的未来
- UVALive
- css应用
- 第29课:彻底解密Spark 1.6.X以前Shuffle中JVM内存使用及配置内幕详情:Spark到底能够缓存多少数据、Shuffle到底占用了多少数据、磁盘的数据远远比内存小却还是报告内存不足?
- Bootstrap 轮播效果
- codeforces 258D Little Elephant and Broken Sorting
- 指针练习
- 51 nod 1082 与7无关的数
- mini版串口通信
- 撸代码记录篇2.1-奔跑的皮皮熊
- 模板___反素数 + poj2286 (反素数+线段树)
- 【bzoj4542】[Hnoi2016]大数
- 指针练习4