Bootstrap carousel轮转图的使用实例详解
来源:互联网 发布:历史上真实的和珅 知乎 编辑:程序博客网 时间:2024/06/07 00:43
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<!DOCTYPE html>
<html>
<head>
<meta charset=
"utf-8"
>
<!-- <link rel=
"stylesheet"
href=
"http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"
>-->
<link rel=
"stylesheet"
href=
"css/bootstrap.min.css"
/>
<style>
body {
padding: 10px;
margin: 10px;
}
</style>
</head>
<body>
<div id=
"myCarousel"
class=
"carousel"
>
<!--第一步:设计轮播图片的容器。-->
<!--
#slidershow 层添加 slide 样式,使用图片与图片切换效果有平滑感-->
<ol class=
"carousel-indicators"
>
<!--第二步:设计轮播图片计数器。-->
<li data-target=
"#myCarousel"
data-slide-to=
"0"
class=
"active"
></li>
<li data-target=
"#myCarousel"
data-slide-to=
"1"
></li>
<li data-target=
"#myCarousel"
data-slide-to=
"2"
></li>
</ol>
<div class=
"carousel-inner"
>
<!--第三步:设计轮播图片播放区,使用 carousel-inner 样式来控制-->
<div class=
"item active"
>
<img src=
"http://images3.c-ctrip.com/rk/201407/ll580x145.jpg"
alt=
""
>
<div class=
"carousel-caption"
>
<h4>标题一</h4>
<p>图片一内容简介</p>
</div>
</div>
<div class=
"item"
>
<img src=
"http://images3.c-ctrip.com/dj/201408/zj/zj_580145.jpg"
alt=
""
>
<div class=
"carousel-caption"
>
<h4>标题二/h4>
<p>图片二内容简介</p>
</div>
</div>
<div class=
"item"
>
<img src=
"http://images3.c-ctrip.com/rk/201403/yfdd580145a.png"
alt=
""
>
<div class=
"carousel-caption"
>
<h4>标题三</h4>
<p>图片三内容简介</p>
</div>
</div>
</div>
<!--第四步:设计轮播图片控制器。向前播放left carousel-control和向后播放的控制器-->
<a class=
"left carousel-control"
href=
"#myCarousel"
data-slide=
"prev"
>‹
<!--<a class=
"left carousel-control"
href=
"#slidershow"
role=
"button"
data-slide=
"prev"
>-->
<span class=
"qlyphicon glyphicon-chevron-left"
></span></a>
<a class=
"right carousel-control"
href=
"#myCarousel"
data-slide=
"next"
>›
<span class=
"qlyphicon glyphicon-chevron-right"
></span></a>
<!--<a class=
"left carousel-control"
href=
"#carousel-example-generic"
data-slide=
"prev"
>
<span class=
"qlyphicon glyphicon-chevron-left"
></span>
</a>
<a class=
"left carousel-control"
href=
"#carousel-example-generic"
data-slide=
"next"
>
<span class=
"qlyphicon glyphicon-chevron-right"
></span>
</a>-->
</div>
<script>
$(
'.carousel'
).carousel()
</script>
<script type=
"text/javascript"
src=
"js/jquery.min.js"
></script>
<script type=
"text/javascript"
src=
"js/bootstrap.min.js"
></script>
<!--<script src=
"http://libs.baidu.com/jquery/1.9.0/jquery.js"
></script>-->
<!--<script src=
"http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"
></script>-->
</body>
</html>
/*bootstrap.css文件第5835行~第5863行*/
.carousel-indicators {
position: absolute;
/*整个计数区域绝对定位*/
bottom: 10px;
/*距容器carousel底部10px*/
z-index: 15;
/*设置其在Z轴的层级*/
/*让整个计数区水平居中*/
left: 50%;
width: 60%;
padding-left: 0;
margin-left: -30%;
text-align: center;
list-style: none;
}
.carousel-indicators li {
display: inline-block;
width: 10px;
height: 10px;
margin: 1px;
text-indent: -999px;
cursor: pointer;
background-color:
#000 \9;
background-color: rgba(0, 0, 0, 0);
border: 1px solid
#fff;
border-radius: 10px;
}
/*设置当前状态样式*/
.carousel-indicators .active {
width: 12px;
height: 12px;
margin: 0;
background-color:
#fff;
}
0 0
- Bootstrap carousel轮转图的使用实例详解
- Bootstrap Carousel
- bootstrap carousel
- 昨日使用Bootstrap轮播器插件Carousel
- Bootstrap插件carousel源码的学习
- 定制bootstrap的carousel-indicators li
- Bootstrap学习之Carousel
- bootstrap中的carousel插件
- Bootstrap Carousel Plugin
- carousel(Bootstrap)
- bootstrap 修改carousel 样式
- bootstrap之carousel
- bootstrap-treeview的使用实例
- Bootstrap的Carousel不能正常播放的几个原因
- bootstrap的carousel-indicators是怎么实现垂直居中的
- Bootstrap轮播(carousel)插件中图片变形的终极解决方案——使用jqthumb.js
- 响应式网站开发框架Bootstrap中Carousel插件的使用及使之支持手机端
- 修改bootstrap中幻灯片carousel的轮播时间
- 作用域
- CSS 设置滚动条样式
- 增量更新(客户端笔记)
- 正则表达式30分钟入门教程
- json表单回填(表单反序列化回填值)
- Bootstrap carousel轮转图的使用实例详解
- PHP之等价变换
- iOS 10 本地推送UNUserNotificationCenter
- tomcat 远程调试
- iOS之https请求客户端---AFNetworking
- android studio 添加assets文件夹
- getline()函数详解
- CTF Web php://filter文件内容包含漏洞
- Java堆内存设置原理