-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcarousel-indicate.html
117 lines (110 loc) · 2.53 KB
/
carousel-indicate.html
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="css/ch-ui.css">
<title>test</title>
</head>
<style type="text/css">
#test{
position: absolute;
width: 640px;
height: 360px;
top: 50%;
left: 50%;
margin-top: -180px;
margin-left: -320px;
overflow: hidden;
}
#test .lt,.gt{
position: absolute;
width: 50px;
height: 50px;
line-height: 50px;
text-align: center;
color: #ffffff;
font-weight: bolder;
font-size: 26px;
z-index: 999999;
top: 50%;
margin-top: -25px;
cursor: pointer;
}
#test .lt{
left: 0;
}
#test .gt{
right: 0;
}
#test .container{
position: absolute;
width: 1280px;
height: 100%;
overflow: hidden;
}
#test .container img{
display: inline-block;
height: 100%;
width: 640px;
float: left;
}
#test .indicators{
position: absolute;
text-align: center;
bottom: 20px;
width: 100%;
}
#test .indicators img{
display: inline-block;
width: 32px;
height: 32px;
border-radius: 16px;
background-color: cadetblue;
cursor: pointer;
}
#test .indicators img.active{
border: 2px solid red;
}
</style>
<body>
<div id="test">
<div class="lt"><</div>
<div class="gt">></div>
<div class="container">
<img src="imgs/e1.jpg" />
<img src="imgs/e2.jpg" />
<img src="imgs/e3.jpg" />
<img src="imgs/e4.jpg" />
<img src="imgs/e5.jpg" />
<img src="imgs/e6.jpg" />
</div>
<div class="indicators">
<img src="imgs/e1.jpg" class="active"/>
<img src="imgs/e2.jpg" />
<img src="imgs/e3.jpg" />
<img src="imgs/e4.jpg" />
<img src="imgs/e5.jpg" />
<img src="imgs/e6.jpg" />
</div>
</div>
<script src="js/libs/bower_components/jquery/dist/jquery.js"></script>
<script src="js/apps/ch-ui.js"></script>
<script>
$("#test").carousel({
distance: "640px",
prev: ".lt",
next: ".gt",
itemsContainer: ".container",
items: ".container>img",
duration: 1200,
delay: 1200,
easing: "swing",
indicators: {
selector: ".indicators>img",
activeClass: "active",
trigger: "mouseenter"
}
});
</script>
</body>
</html>