11html {
2-
32 background-size : cover;
4- font-family : 'helvetica neue' ;
3+ font-family : 'helvetica neue' , sans-serif ;
54 text-align : center;
65 font-size : 10px ;
76 }
@@ -16,11 +15,12 @@ html {
1615 flex : 1 ;
1716 min-height : 100vh ;
1817 align-items : center;
18+ justify-content : center;
1919 }
2020
2121 .clock {
22- width : 60 rem ;
23- height : 60 rem ;
22+ width : 45 rem ;
23+ height : 45 rem ;
2424 border : 20px solid white;
2525 border-radius : 50% ;
2626 margin : 50px auto;
@@ -37,20 +37,67 @@ html {
3737 position : relative;
3838 width : 100% ;
3939 height : 100% ;
40- transform : translateY (-3px ); /* account for the height of the clock hands */
40+ transform : translateY (-3px ); /*account for the height of the clock hands*/
4141 }
4242
43+ .clock-face ::after {
44+ content : '' ;
45+ background-color : # 000 ;
46+ width : 25px ;
47+ height : 25px ;
48+ position : absolute;
49+ top : 50% ;
50+ left : 50% ;
51+ transform : translate (-50% , -50% );
52+ border-radius : 50% ;
53+ z-index : 11 ;
54+ }
55+
56+ .number {
57+ --rotate : 0 ;
58+ position : absolute;
59+ width : 100% ;
60+ height : 100% ;
61+ text-align : center;
62+ transform : rotate (var (--rotate ));
63+ color : # fff ;
64+ }
65+
66+ .number1 { --rotate : 30deg ; }
67+ .number2 { --rotate : 60deg ; }
68+ .number3 { --rotate : 90deg ; }
69+ .number4 { --rotate : 120deg ; }
70+ .number5 { --rotate : 150deg ; }
71+ .number6 { --rotate : 180deg ; }
72+ .number7 { --rotate : 210deg ; }
73+ .number8 { --rotate : 240deg ; }
74+ .number9 { --rotate : 270deg ; }
75+ .number10 { --rotate : 300deg ; }
76+ .number11 { --rotate : 330deg ; }
77+
4378 .hand {
79+ --rotation : 0 ;
4480 width : 50% ;
45- height : 6px ;
46- background : black;
81+ height : 3px ;
4782 position : absolute;
4883 top : 50% ;
49- transform-origin : 100% ;
50- transform : rotate (90deg );
51-
84+ left : 50% ;
85+ background-color : rgb (0 , 0 , 0 );
86+ transform-origin : left;
87+ transform : translateX (-50% );
88+ z-index : 10 ;
89+ }
90+ .hand .hour-hand {
91+ width : 40% ;
92+ height : 10px ;
5293 }
53- .second-hand {
94+
95+ .hand .min-hand {
96+ width : 45% ;
97+ height : 7px ;
98+ }
99+
100+ .hand .second-hand {
54101 background : rgb (179 , 16 , 94 );
55-
56102 }
103+
0 commit comments