-
Notifications
You must be signed in to change notification settings - Fork 0
/
styles.css
126 lines (106 loc) · 1.89 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
*{
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Blaka Hollow', cursive;
}
body{
background-color: #ECF0F1;
display: flex;
height: 100vh;
justify-content: center;
align-items: center;
}
.clock{
width: 500px;
height: 500px;
border-radius: 50%;
background-image: linear-gradient(
48deg,
rgba(112, 155, 159, 0.65) 0%,
rgba(60, 95, 132, 0.75) 42%,
rgba(215, 219, 221, 0.65) 100%
);
border: 1px solid black;
position: relative;
}
.clock .number{
--rotation: 0;
position: absolute;
width: 100%;
height: 100%;
text-align: center;
transform: rotate(var(--rotation));
font-size: 1.8rem;
}
.clock .hand{
--rotation: 0;
position: absolute;
bottom: 50%;
left: 50%;
z-index: 10;
transform: translateX(-50%) rotate(calc(var(--rotation)*1deg));
transform-origin: bottom;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
}
.clock .hand.hours{
width: 10px;
height: 25%;
background-color: black;
}
.clock .hand.minutes{
width: 6px;
height: 32.5%;
background-color: black;
}
.clock .hand.seconds{
width: 3px;
height: 40%;
background-color: rgb(253, 0, 0);
}
.clock::after{
background-color: black;
content: "";
position: absolute;
width: 10px;
height: 10px;
border-radius: 50%;
top: 50%;
left: 50%;
z-index: 11;
transform: translate(-50%, -50%);
}
.clock .number.number-1{
--rotation: 30deg;
}
.clock .number.number-2{
--rotation: 60deg;
}
.clock .number.number-3{
--rotation: 90deg;
}
.clock .number.number-4{
--rotation: 120deg;
}
.clock .number.number-5{
--rotation: 150deg;
}
.clock .number.number-6{
--rotation: 180deg;
}
.clock .number.number-7{
--rotation: 210deg;
}
.clock .number.number-8{
--rotation: 240deg;
}
.clock .number.number-9{
--rotation: 270deg;
}
.clock .number.number-10{
--rotation: 300deg;
}
.clock .number.number-11{
--rotation: 330deg;
}