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
/*******************
 * 雪花計時器
 *******************/
.snowflake, .snowflake:hover {
    right: 40px;                    /* 雪花位置 */
    bottom: 45px;                   /* 雪花位置 */
    transform: scale(100%);          /* 可以放大雪花,預設100% */
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.snowflake{
    opacity: 0.5;
}
.snowflake:hover{
    opacity: 1;
}

/* 分針 */
.snowflake::before {
    position: absolute;
    content: ' ';
    width: 3px;
    height: calc(80%);
    animation: rotating 3600s linear infinite;
    transform-origin: bottom;
    background-color: #FFF;
    bottom: calc(50%);
    left: calc(50%);
    border-radius: 10px;
    filter: drop-shadow(0 0 3px #0000007d);
}

/* 秒針 */
.snowflake::after {
    position: absolute;
    content: ' ';
    width: 2px;
    height: calc(80%);
    animation: rotating 60s linear infinite;
    transform-origin: bottom;
    background-color: #FF3000;
    bottom: calc(50%);
    left: calc(50%);
    border-radius: 10px;
    filter: drop-shadow(0 0 3px #f00);
}