-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.css
115 lines (101 loc) · 2.1 KB
/
style.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
111
112
113
114
115
.frame {
background-color: #e8e8e8;
width: 420px;
height: 420px;
border-radius: 50%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
box-shadow: 0em -1.2em 1.2em rgba(255, 255, 255, 0.06),
inset 0em -1.2em 1.2em rgba(255, 255, 255, 0.06),
0em 1.2em 1.2em rgba(0, 0, 0, 0.3), inset 0em 1.2em 1.2em rgba(0, 0, 0, 0.3);
}
.clock {
width: 400px;
height: 400px;
color: #000;
border-radius: 50%;
position: relative;
}
.hand {
position: absolute;
right: 50%;
bottom: 50%;
width: 2%;
height: 40%;
background-color: var(--primary-color);
border-top-left-radius: 50%;
border-top-right-radius: 50%;
transform: translate(50%);
transform-origin: bottom;
}
.hour {
width: 3%;
height: 30%;
background-color: black;
transform: rotate(60deg);
}
.minute {
transform: rotate(90deg);
}
.second {
width: 1%;
height: 45%;
background-color: var(--secondary-color);
transform: rotate(290deg);
}
.pin {
position: absolute;
width: 20px;
height: 20px;
background-color: black;
border: 2px solid var(--secondary-color);
right: 50%;
top: 50%;
border-radius: 50%;
transform: translate(50%, -50%);
}
.number {
font-size: 2rem;
position: absolute;
width: 100%;
height: 100%;
text-align: center;
transform: rotate(calc(var(--count) * 30deg));
color: var(--main-text-color);
}
.number span {
display: block;
transform: rotate(calc(var(--count) * -30deg));
}
/* miscellaneous styles */
:root {
--main-bg-color: #e5e5e5;
--main-text-color: #828282;
--primary-color: #3a3a3a;
--secondary-color: #30bced;
}
body {
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
background-color: var(--main-bg-color);
color: var(--main-text-color);
}
main {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
gap: 20px;
}
.title {
font-size: 2.5rem;
font-weight: 400;
color: var(--primary-color);
}
.digital-clock {
margin-top: 4rem;
font-size: 2rem;
font-weight: 300;
}