Repository navigation
Expand file tree
/
Copy pathstyle.css
More file actions
114 lines (105 loc) · 2.18 KB
/
Copy pathstyle.css
File metadata and controls
114 lines (105 loc) · 2.18 KB
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
*, *::after, *::before {
box-sizing: border-box;
font-family: Arial, Helvetica, sans-serif;
}
body {
background: linear-gradient(to right, hsl(200, 100%, 50%), hsl(175, 100%, 50%));
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
overflow: hidden;
}
.watch {
background-color: aliceblue;
width: 400px;
height: 400px;
border-radius: 50%;
border: 3px solid #000;
position: relative;
}
.watch .number {
--rotation: 0;
position: absolute;
width: 100%;
height: 100%;
text-align: center;
font-weight: 600;
transform: rotate(var(--rotation));
font-size: 1.5rem;
}
.watch .number1 {
--rotation: 30deg;
}.watch .number2 {
--rotation: 60deg;
}.watch .number3 {
--rotation: 90deg;
font-size: 3rem;
color: crimson;
}.watch .number4 {
--rotation: 120deg;
}.watch .number5 {
--rotation: 150deg;
}.watch .number6 {
--rotation: 180deg;
font-size: 3rem;
color: crimson;
}.watch .number7 {
--rotation: 210deg;
}.watch .number8 {
--rotation: 240deg;
}.watch .number9 {
--rotation: 270deg;
color: crimson;
font-size: 3rem;
}.watch .number10 {
--rotation: 300deg;
}.watch .number11 {
--rotation: 330deg;
}.watch .number12 {
--rotation: 360deg;
font-size: 3rem;
color: crimson;
}
.watch .hand {
--rotation: 0;
position: absolute;
bottom: 50%;
left: 50%;
width: 10px;
height: 50%;
background-color: #000;
border: 1px solid #fff;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
z-index: 10;
transform: translateX(-50%) rotate(calc(var(--rotation) * 1deg));
transform-origin: bottom;
}
.watch .hand.second {
width: 3px;
height: 45%;
background-color: rgb(0, 255, 81);
}
.watch .hand.minute {
width: 5px;
height: 35%;
background-color: #000;
}
.watch .hand.hour {
width: 7px;
height: 28%;
background-color: #000;
}
.watch::after {
content: "";
position: absolute;
background-color: #000;
z-index: 11;
width: 15px;
height: 15px;
top: 50%;
left: 50%;
border-radius: 50%;
transform: translate(-50%, -50%);
}