-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlight-swiper.css
More file actions
141 lines (119 loc) · 2.33 KB
/
Copy pathlight-swiper.css
File metadata and controls
141 lines (119 loc) · 2.33 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
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
/**
* Created by PhpStorm.
* User: Devmc
* Date: 2021/8/25
* Time: 2:38
*/
.light-swiper {
position: relative;
overflow: hidden;
width: 960px;
height: 540px;
background-color: #eee;
}
/*初始化之前设置的图片,不显示*/
.light-swiper > img {
display: none;
}
/*左右箭头*/
.light-swiper .arrow-button {
border: none;
outline: none;
padding: 0;
margin: 0;
height: 2.2rem;
width: 2.2rem;
cursor: pointer;
transition: .3s;
border-radius: 50%;
background-color: rgba(31, 45, 61, 0.11);
color: #fff;
position: absolute;
top: 50%;
transform: translateY(-50%);
display: inline-flex;
justify-content: center;
align-items: center;
}
.light-swiper .arrow-button:hover {
background-color: rgba(31, 45, 61, 0.33);
}
/*img svg*/
.light-swiper .arrow-button > * {
max-width: 2rem;
max-height: 2rem;
}
.light-swiper .arrow-button.arrow-left {
left: 1rem;
}
.light-swiper .arrow-button.arrow-right {
right: 1rem;
}
/*hover*/
.light-swiper.hover-buttons .arrow-left {
transition: left 0.3s;
left: -2.2rem;
}
.light-swiper.hover-buttons .arrow-right {
transition: right 0.3s;
right: -2.2rem;
}
.light-swiper.hover-buttons:hover .arrow-left {
left: 1rem;
}
.light-swiper.hover-buttons:hover .arrow-right {
right: 1rem;
}
/*图片列表*/
.light-swiper ul {
height: inherit;
list-style: none;
margin: 0;
padding: 0;
position: relative;
transition: left 500ms ease-in-out;
}
.light-swiper ul li {
height: inherit;
position: absolute;
left: 0;
display: inline;
}
.light-swiper ul li a {
display: block;
height: inherit;
text-decoration: none;
}
.light-swiper ul li img {
object-fit: cover;
height: inherit;
}
/*小圆点*/
.light-swiper .dots {
position: absolute;
bottom: 1rem;
left: 50%;
transform: translateX(-50%);
user-select: none;
}
.light-swiper .dots span {
display: inline-block;
width: .9rem;
height: .9rem;
cursor: pointer;
border-radius: 100%;
background-color: white;
margin: 0 .4rem;
opacity: .5;
}
.light-swiper .dots span.active {
opacity: 1;
}
/*hover*/
.light-swiper.hover-dots .dots {
opacity: 0;
transition: opacity 0.3s;
}
.light-swiper.hover-dots:hover .dots {
opacity: 1;
}