Skip to content

Commit 70c424a

Browse files
committed
volume control
1 parent 1a03bfe commit 70c424a

5 files changed

Lines changed: 151 additions & 47 deletions

File tree

APlayer.css

Lines changed: 66 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -77,20 +77,24 @@
7777
user-select: none;
7878
}
7979

80-
.aplayer-pic {
80+
.aplayer span {
81+
cursor: default;
82+
}
83+
84+
.aplayer .aplayer-pic {
8185
position: relative;
8286
float: left;
8387
height: 100%;
8488
width: 66px;
8589
}
8690

87-
.aplayer-pic img {
91+
.aplayer .aplayer-pic img {
8892
height: 100%;
8993
width: 100%;
9094
border-radius: 2px 0 0 2px;
9195
}
9296

93-
.aplayer-mask {
97+
.aplayer .aplayer-mask {
9498
position: absolute;
9599
top: 0;
96100
left: 0;
@@ -99,7 +103,7 @@
99103
background: rgba(0, 0, 0, 0.2);
100104
}
101105

102-
.aplayer-button {
106+
.aplayer .aplayer-button {
103107
position: absolute;
104108
color: #fff;
105109
border-radius: 50%;
@@ -110,15 +114,15 @@
110114
background: rgba(0, 0, 0, 0.2);
111115
}
112116

113-
.aplayer-button:hover {
117+
.aplayer .aplayer-button:hover {
114118
opacity: 1;
115119
}
116120

117-
.aplayer-hide {
121+
.aplayer .aplayer-hide {
118122
display: none;
119123
}
120124

121-
.aplayer-play {
125+
.aplayer .aplayer-play {
122126
width: 26px;
123127
height: 26px;
124128
border: 2px solid #fff;
@@ -127,73 +131,73 @@
127131
margin: -15px 0 0 -15px;
128132
}
129133

130-
.aplayer-play .icon-play {
134+
.aplayer .aplayer-play .icon-play {
131135
position: absolute;
132136
top: 2px;
133137
left: 4px;
134138
font-size: 20px;
135139
}
136140

137-
.aplayer-pause {
141+
.aplayer .aplayer-pause {
138142
width: 16px;
139143
height: 16px;
140144
border: 2px solid #fff;
141145
bottom: 4px;
142146
right: 4px;
143147
}
144148

145-
.aplayer-pause .icon-pause {
149+
.aplayer .aplayer-pause .icon-pause {
146150
position: absolute;
147151
top: 2px;
148152
left: 2px;
149153
font-size: 12px;
150154
}
151155

152-
.aplayer-info {
156+
.aplayer .aplayer-info {
153157
margin-left: 66px;
154158
padding: 17px 7px 0 10px;
155159
}
156160

157-
.aplayer-music {
161+
.aplayer .aplayer-music {
158162
margin-bottom: 17px;
159163
}
160164

161-
.aplayer-title {
165+
.aplayer .aplayer-title {
162166
font-size: 14px;
163167
}
164168

165-
.aplayer-author {
169+
.aplayer .aplayer-author {
166170
font-size: 12px;
167171
color: #666;
168172
}
169173

170-
.aplayer-music a {
174+
.aplayer .aplayer-music a {
171175
margin-left: 20px;
172176
font-size: 14px;
173177
color: #000;
174178
}
175179

176-
.aplayer-music a:hover {
180+
.aplayer .aplayer-music a:hover {
177181
color: #E90F24;
178182
}
179183

180-
.aplayer-controller {
184+
.aplayer .aplayer-controller {
181185
position: relative;
182186
}
183187

184-
.aplayer-bar-wrap {
185-
margin-right: 110px;
188+
.aplayer .aplayer-bar-wrap {
189+
margin-right: 120px;
186190
}
187191

188-
.aplayer-bar {
192+
.aplayer .aplayer-bar {
189193
position: relative;
190194
height: 2px;
191195
width: 100%;
192196
background: #cdcdcd;
193197
cursor: pointer;
194198
}
195199

196-
.aplayer-loaded {
200+
.aplayer .aplayer-loaded {
197201
position: absolute;
198202
left: 0;
199203
top: 0;
@@ -203,7 +207,7 @@
203207
transition: all 0.5s ease;
204208
}
205209

206-
.aplayer-played {
210+
.aplayer .aplayer-played {
207211
position: absolute;
208212
left: 0;
209213
top: 0;
@@ -212,7 +216,7 @@
212216
height: 2px;
213217
}
214218

215-
.aplayer-thumb {
219+
.aplayer .aplayer-thumb {
216220
position: absolute;
217221
top: 0;
218222
right: 0;
@@ -226,20 +230,56 @@
226230
cursor: pointer;
227231
}
228232

229-
.aplayer-thumb:hover {
233+
.aplayer .aplayer-thumb:hover {
230234
background: #b7daff;
231235
}
232236

233-
.aplayer-time {
237+
.aplayer .aplayer-time {
234238
position: absolute;
235239
right: 0;
236240
bottom: -5px;
241+
height: 17px;
237242
color: #999;
238243
font-size: 11px;
239244
}
240245

241-
.icon-volume-down {
246+
.aplayer .aplayer-time i {
242247
color: #666;
243248
font-size: 15px;
249+
}
250+
251+
.aplayer .aplayer-volume-wrap {
252+
display: inline-block;
244253
margin-left: 7px;
254+
cursor: pointer;
255+
}
256+
257+
.aplayer .aplayer-volume-wrap:hover .aplayer-volume-bar-wrap {
258+
display: block;
259+
}
260+
261+
.aplayer .aplayer-volume-bar-wrap {
262+
display: none;
263+
position: absolute;
264+
bottom: 17px;
265+
right: -5px;
266+
width: 25px;
267+
height: 40px;
268+
}
269+
270+
.aplayer .aplayer-volume-bar {
271+
position: absolute;
272+
bottom: 0;
273+
right: 10px;
274+
width: 5px;
275+
height: 35px;
276+
background: #aaa;
277+
}
278+
279+
.aplayer .aplayer-volume {
280+
position: absolute;
281+
bottom: 0;
282+
right: 0;
283+
width: 5px;
284+
background: #b7daff;
245285
}

0 commit comments

Comments
 (0)