-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstyles.css
110 lines (99 loc) · 1.95 KB
/
styles.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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
/* font-family: 'Roboto', sans-serif; */
font-size: 16px;
line-height: 1.5;
/* color: #333; */
background: rgb(11, 13, 14);
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
overflow: hidden;
}
.clock {
width: 350px;
height: 350px;
position: relative;
}
.clock .nw {
--rotation: 0;
position: absolute;
width: 100%;
height: 100%;
/* display: flex; */
/* align-items: center; */
text-align: center;
transform: rotate(var(--rotation));
color: rgb(255, 255, 249);
}
.clock .nw-1 {
--rotation: 30deg;
}
.clock .nw-2 {
--rotation: 60deg;
}.clock .nw-3 {
--rotation: 90deg;
}.clock .nw-4 {
--rotation: 120deg;
}.clock .nw-5 {
--rotation: 150deg;
}.clock .nw-6 {
--rotation: 180deg;
}.clock .nw-7 {
--rotation: 210deg;
}.clock .nw-8 {
--rotation: 240deg;
}.clock .nw-9 {
--rotation: 270deg;
}.clock .nw-10 {
--rotation: 300deg;
}.clock .nw-11 {
--rotation: 330deg;
}.clock .nw-12 {
--rotation: 360deg;
}
.clock .hand {
--rotation: 0;
position: absolute;
bottom: 50%;
left: 50%;
z-index: 10;
background-color: rgb(255, 255, 249);
transform: translateX(-50%) rotate(calc(var(--rotation) * 1deg));
transform-origin: bottom;
}
.clock::after {
content: '';
position: absolute;
background-color: rgb(255, 255, 249);
z-index: 11;
width: 5px;
height: 5px;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
border-radius: 50%;
}
.clock .hand.hour {
position: absolute;
width: 2px;
height: 50px;
background-color: rgb(255, 255, 249);
}
.clock .minute.hand {
position: absolute;
width: 2px;
height: 85px;
background-color: rgb(255, 255, 249);
}
.clock .hand.second {
position: absolute;
width: 2px;
height: 120px;
background-color: red;
}