• 自己的博客既有白色模式,也有深色模式,晚上用深色模式的时候aplayer还是白色就显得很突兀了,于是把深色模式给配上顺便美化一波

实现

自定义引入的custom.css文件添加代码

ps:怎么引入看hexo博客butterfly主题安装及魔改笔记魔改配置章节
在自定义引入的custom.css文件添加如下代码:

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
/*aplayer日间模式调整*/
/*背景色*/
.aplayer{
background: rgba(255, 255, 255, 0.60)!important;
box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.07),0 1px 5px 0 rgba(0,0,0,.1);
position: relative;
}
.aplayer.aplayer-fixed .aplayer-lrc:after,.aplayer.aplayer-fixed .aplayer-lrc:before {
display: none
}
.aplayer.aplayer.aplayer-fixed .aplayer-body{
background:rgba(255, 255, 255, 0.60)!important;
box-shadow: 0 2px 2px 0 rgba(0,0,0,.07),0 1px 5px 0 rgba(0,0,0,.1);
position: fixed;
}
/*毛玻璃效果*/
.aplayer-list{
backdrop-filter: blur(3px);
}
.aplayer-info{
backdrop-filter: blur(3px);
}
/*滚动条*/
.aplayer .aplayer-list ol::-webkit-scrollbar {
width: 5px
}
.aplayer .aplayer-list ol::-webkit-scrollbar-thumb {
border-radius: 3px;
background-color: #b0e1ff
}
.aplayer .aplayer-list ol::-webkit-scrollbar-thumb:hover {
background-color: #b0e1ff
}
/*圆角*/
.aplayer.aplayer-fixed .aplayer-list{
border-radius: 6px 6px 0 0!important;
}
.aplayer.aplayer-fixed .aplayer-miniswitcher{
border-radius: 0 6px 6px 0!important;
}
.aplayer.aplayer-fixed.aplayer-narrow .aplayer-body{
transition: 0.28s!important;
border-radius: 6px!important;
}
/*选中与播放中歌曲激活颜色*/
.aplayer .aplayer-list ol li:hover{
background: #b0e1ff!important;
}
.aplayer .aplayer-list ol li.aplayer-list-light{
background: #ffdffa!important;
}

/*aplayer黑暗模式*/
[data-theme=dark]
.aplayer{
background: rgba(22, 22, 22, 0.60)!important;
color: rgb(255, 255, 255);
box-shadow: 0 2px 2px 0 rgba(0,0,0,.07),0 1px 5px 0 rgba(0,0,0,.1);
}
[data-theme=dark]
.aplayer.aplayer-fixed .aplayer-body{
background: rgba(22, 22, 22, 0.60)!important;
color: rgb(255, 255, 255);
box-shadow: 0 2px 2px 0 rgba(0,0,0,.07),0 1px 5px 0 rgba(0,0,0,.1);
}
[data-theme=dark]
.aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon path{
fill: #d4d4d4;
}
[data-theme=dark]
.aplayer .aplayer-list ol li:hover{
background: #407290!important;
}
[data-theme=dark]
.aplayer .aplayer-list ol li.aplayer-list-light{
background: #9c8098!important;
}
[data-theme=dark]
.aplayer .aplayer-info .aplayer-controller .aplayer-time{
color: #d4d4d4;
}
[data-theme=dark]
.aplayer .aplayer-list ol li .aplayer-list-index{
color: #d4d4d4;
}
[data-theme=dark]
.aplayer .aplayer-list ol li .aplayer-list-author{
color: #d4d4d4;
}

预览的话看本站的音乐播放器