-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtst.css
More file actions
84 lines (69 loc) · 1.29 KB
/
tst.css
File metadata and controls
84 lines (69 loc) · 1.29 KB
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
* {
margin: 0;
padding: 0;
}
#wrap {
position: relative;
/*容器盒子都是设为相对定位*/
width: 590px;
height: 470px;
margin: 50px auto;
/*左右居中*/
}
/*图前面的小点和箭头去掉*/
#wrap ul {
list-style: none;
}
/*将图片都叠加到一块(布局)*/
#wrap .imgs li {
position: absolute;
/*所有图片居中集合*/
display: none;
}
/*当前活动图的展示*/
#wrap .imgs li.active {
display: block;
}
/*左右按钮的布局*/
#wrap .lrbtn li {
position: absolute;
top: 50%;
/*垂直布局*/
margin-top: -40px;
/*相对居中*/
width: 40px;
height: 80px;
background-color: white;
/*背景色*/
opacity: 0.5;
/*透明度*/
line-height: 80px;
/*小箭头垂直居中,行高设置与按钮同高就可以*/
}
#wrap .lrbtn li:last-child {
right: 0;
}
/*轮播按钮的布局设计*/
#wrap .btn {
position: absolute;
bottom: 10px;
left: 0;
right: 0;
margin: auto;
background-color: pink;
display: flex;
width: 210px;
height: 30px;
border-radius: 20px;
}
#wrap .btn li {
width: 20px;
height: 20px;
flex: 1;
border-radius: 10px;
background-color: white;
margin: 5px;
}
#wrap .btn li.on {
background-color: red;
}