-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathindex.html
101 lines (89 loc) · 3.88 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/control.css">
<title>css轮播</title>
</head>
<body>
<!--主容器-->
<div class="container">
<!--控制转到第几张按钮-->
<input id="btn1" name="dir" type="radio" />
<input id="btn2" name="dir" type="radio" />
<input id="btn3" name="dir" type="radio" />
<input id="btn4" name="dir" type="radio" />
<input id="btn5" name="dir" type="radio" />
<!--控制往左边轮播-->
<input id="left_btn1" class="dir_btn" name="dir" type="radio" />
<input id="left_btn2" class="dir_btn" name="dir" type="radio" />
<input id="left_btn3" class="dir_btn" name="dir" type="radio" />
<input id="left_btn4" class="dir_btn" name="dir" type="radio" />
<input id="left_btn5" class="dir_btn" name="dir" type="radio" />
<!--控制往右边轮播-->
<input id="right_btn1" class="dir_btn" name="dir" type="radio" />
<input id="right_btn2" class="dir_btn" name="dir" type="radio" />
<input id="right_btn3" class="dir_btn" name="dir" type="radio" />
<input id="right_btn4" class="dir_btn" name="dir" type="radio" />
<input id="right_btn5" class="dir_btn" name="dir" type="radio" />
<!--存放图片-->
<div class="pic">
<!--给所有图片套一个盒子 通过左边距进行轮播-->
<div class="box">
<img src="image/1.jpg">
<img src="image/2.jpg">
<img src="image/3.jpg">
<img src="image/4.jpg">
<img src="image/5.jpg">
</div>
<!--给图片前面加一层图片层 用于实现无缝轮播-->
<div class="before_box">
<img src="image/5.jpg">
<img src="image/1.jpg">
</div>
<!--给图片后面加一层图片层 用于实现无缝轮播-->
<div class="after_box">
<img src="image/5.jpg">
<img src="image/1.jpg">
</div>
</div>
<!--左边的按钮 每次点击都会根据当前是第几张决定显示的按钮-->
<div class="left_box dir_box">
<label class="left_btn_1 btn_btn_1" for="left_btn1"></label>
<label class="left_btn_2 btn_btn_2" for="left_btn2"></label>
<label class="left_btn_3 btn_btn_3" for="left_btn3"></label>
<label class="left_btn_4 btn_btn_4" for="left_btn4"></label>
<label class="left_btn_5 btn_btn_5" for="left_btn5"></label>
</div>
<!--右边的按钮 每次点击都会根据当前是第几张决定显示的按钮-->
<div class="right_box dir_box">
<label class="right_btn_1 btn_btn_1" for="right_btn1"></label>
<label class="right_btn_2 btn_btn_2" for="right_btn2"></label>
<label class="right_btn_3 btn_btn_3" for="right_btn3"></label>
<label class="right_btn_4 btn_btn_4" for="right_btn4"></label>
<label class="right_btn_5 btn_btn_5" for="right_btn5"></label>
</div>
<!--下方按钮 点击各个按钮 决定跳转到第几张-->
<div class="count">
<ul>
<li class="current">
<label class="btn_1" for="btn1"></label>
</li>
<li>
<label class="btn_2" for="btn2"></label>
</li>
<li>
<label class="btn_3" for="btn3"></label>
</li>
<li>
<label class="btn_4" for="btn4"></label>
</li>
<li>
<label class="btn_5" for="btn5"></label>
</li>
</ul>
</div>
</div>
</body>
</html>