-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.css
109 lines (105 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
*, *::after, *::before {
box-sizing: border-box;
font-family: Gotham Rounded, sans-serif;
}
body {
background: linear-gradient( #e1ccec, #561f55);
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
overflow: hidden;
}
.clock {
width: 450px;
height: 450px;
/* background-image: radial-gradient( rgb(68, 68, 68), rgb(49, 49, 48), rgb(0, 0, 0)); */
background-image: radial-gradient( rgb(68, 68, 68), rgb(39, 39, 38), rgb(0, 0, 0));
border-radius: 50%;
border: 5px solid rgb(255, 255, 255);
position: relative;
box-shadow: 3px 10px 12px #181717;
}
.clock .number {
--rotation: 0;
position: absolute;
width: 100%;
color: white;
height: 100%;
text-align: center;
transform: rotate(var(--rotation));
font-size: 2.5rem;
}
.clock .number1 {
--rotation: 30deg;
}
.clock .number2 {
--rotation: 60deg;
}
.clock .number3 {
--rotation: 90deg;
}
.clock .number4 {
--rotation: 120deg;
}
.clock .number5 {
--rotation: 150deg;
}
.clock .number6 {
--rotation: 180deg;
}
.clock .number7 {
--rotation: 210deg;
}
.clock .number8 {
--rotation: 240deg;
}
.clock .number9 {
--rotation: 270deg;
}
.clock .number10 {
--rotation: 300deg;
}
.clock .number11 {
--rotation: 330deg;
}
.clock .hand {
--rotation: 0;
position: absolute;
bottom: 50%;
left: 50%;
border: 1px solid black;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
transform-origin: bottom;
z-index: 10;
transform: translateX(-50%) rotate(calc(var(--rotation) *1deg));
}
.clock::after {
content: '';
position: absolute;
background-color: black;
border: 2px solid white;
z-index: 11;
width: 15px;
height: 15px;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
border-radius: 50%;
}
.clock .hand.second {
width: 3.5px;
height: 45%;
background-color: red;
}
.clock .hand.minute {
width: 7px;
height: 40%;
background-color: #fff600;
}
.clock .hand.hour {
width: 10px;
height: 34%;
background-color: #9ede73;
}