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
/*-------------- 以下是風鈴 --------------*/
/*-------調整數值時,0=0%,1=100%-------*/

#notif-sound-control {
    position: absolute;
    bottom: 16px;
    right: 16px;
    padding: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    outline: 0 solid rgba(255, 255, 255, 0);
    font-size: 4em;
    background: transparent radial-gradient(rgba(225, 225, 225, 1), transparent 0%);
    color: #fff;
    border-radius: 50%;
    z-index: 701;
    opacity: 1;  /*整體透明度*/
    transition: opacity 120ms ease-out;
}

/*打開通知時*/
#notif-sound-control.enabled > div {
    content: url(這裡放圖的網址);
    transition: opacity, -webkit-filter 120ms ease-out;
    transition: filter 120ms ease-out, opacity;
    transition: filter 120ms ease-out, opacity, -webkit-filter 120ms ease-out;
    -webkit-filter: grayscale(0) brightness(1) drop-shadow(0 2px 3px rgba(0, 0, 0, 0.4));
    filter: grayscale(0) brightness(1) drop-shadow(0 2px 3px rgba(0, 0, 0, 0.4));
    /*grayscale=灰度,brightness=明度*/
    /*drop-shadow=底部陰影,rgba(rgb是顏色, a是透明度)*/
}

/*關掉通知時*/
#notif-sound-control > div {
    content: url(這裡放圖的網址);
    transition: opacity, -webkit-filter 120ms ease-out;
    transition: filter 120ms ease-out, opacity;
    transition: filter 120ms ease-out, opacity, -webkit-filter 120ms ease-out;
    -webkit-filter: grayscale(0.5) brightness(0.8) drop-shadow(0 2px 3px rgba(0, 0, 0, 0));
    filter: grayscale(0.5) brightness(0.8) drop-shadow(0 2px 3px rgba(0, 0, 0, 0));
    /*grayscale=灰度,brightness=明度*/
    /*drop-shadow=底部陰影,rgba(rgb是顏色, a是透明度)*/
}

/*游標移到上方*/
#notif-sound-control:hover > div  {
content: url(這裡放圖的網址);
}

/*-------------- 以上是風鈴 --------------*/