1+ * , * ::after , ::before {
2+ box-sizing : border-box;
3+ font-family : Gotham Rounded, sans-serif ;
4+ }
5+
6+ body {
7+ background : linear-gradient (to right, rgb (7 , 203 , 242 ), rgb (94 , 163 , 253 ), rgb (88 , 194 , 255 ));
8+ justify-content : center;
9+ display : flex;
10+ align-items : center;
11+ min-height : 100vh ;
12+ overflow : hidden;
13+ }
14+
15+ .clock {
16+ background-color : rgba (255 , 255 , 255 , 8 );
17+ width : 500px ;
18+ height : 500px ;
19+ border-radius : 50% ;
20+ border : 2px solid black;
21+ position : relative;
22+ }
23+
24+ .clock .number {
25+ position : absolute;
26+ width : 100% ;
27+ height : 100% ;
28+ text-align : center;
29+ transform : rotate (var (--rotation ));
30+ font-size : 1.5rem ;
31+ }
32+
33+ .clock .number1 { --rotation : 30deg }
34+ .clock .number2 { --rotation : 60deg }
35+ .clock .number3 { --rotation : 90deg }
36+ .clock .number4 { --rotation : 120deg }
37+ .clock .number5 { --rotation : 150deg }
38+ .clock .number6 { --rotation : 180deg }
39+ .clock .number7 { --rotation : 210deg }
40+ .clock .number8 { --rotation : 240deg }
41+ .clock .number9 { --rotation : 270deg }
42+ .clock .number10 { --rotation : 300deg }
43+ .clock .number11 { --rotation : 330deg }
44+
45+ .clock .hand {
46+ --rotation : 30 ;
47+ position : absolute;
48+ left : 50% ;
49+ bottom : 50% ;
50+ transform-origin : bottom;
51+ transform : translateX (-50% ) rotate (calc (var (--rotation )* 1deg ));
52+ border : 1px solid white;
53+ border-top-left-radius : 10px ;
54+ border-top-right-radius : 10px ;
55+ z-index : 10 ;
56+ }
57+
58+ .clock ::after {
59+ content : "" ;
60+ position : absolute;
61+ height : 15px ;
62+ width : 15px ;
63+ z-index : 11 ;
64+ top : 50% ;
65+ left : 50% ;
66+ background-color : black;
67+ transform : translate (-50% , -50% );
68+ border-radius : 50% ;
69+ }
70+
71+ .clock .hand .second {
72+ width : 3px ;
73+ height : 45% ;
74+ background-color : rgb (8 , 0 , 255 );
75+ }
76+
77+ .clock .hand .minute {
78+ width : 7px ;
79+ height : 40% ;
80+ background-color : rgba (0 , 0 , 0 , 0.808 );
81+ }
82+
83+ .clock .hand .hour {
84+ width : 10px ;
85+ height : 35% ;
86+ background-color : black;
87+ }
0 commit comments