|
| 1 | +* { |
| 2 | + margin: 0; |
| 3 | + padding: 0; |
| 4 | + box-sizing: border-box; |
| 5 | +} |
| 6 | + |
1 | 7 | body { |
2 | | - display: flex; |
3 | | - justify-content: center; |
4 | | - align-items: center; |
5 | | - height: 100vh; |
6 | | - background: #f0f0f0; |
7 | | - margin: 0; |
| 8 | + display: flex; |
| 9 | + justify-content: center; |
| 10 | + align-items: center; |
| 11 | + min-height: 100vh; |
| 12 | + background-color: #2a083d; |
| 13 | + z-index: -1; |
8 | 14 | } |
9 | 15 |
|
10 | 16 | .clock { |
11 | | - position: relative; |
12 | | - width: 300px; |
13 | | - height: 300px; |
14 | | - border: 10px solid #333; |
15 | | - border-radius: 50%; |
16 | | - background: white; |
17 | | - box-shadow: 0 0 10px rgba(0, 0, 0, 0.2); |
| 17 | + width: 350px; |
| 18 | + height: 350px; |
| 19 | + background: url("./assets/clock.png"); |
| 20 | + background-size: cover; |
| 21 | + display: flex; |
| 22 | + justify-content: center; |
| 23 | + align-items: center; |
| 24 | + border-radius: 50%; |
| 25 | + border: 4px solid #091921; |
| 26 | + box-shadow: |
| 27 | + 0 -15px 15px rgba(255, 255, 255, 0.25), |
| 28 | + inset 0 -15px 15px rgba(255, 255, 255, 0.05), |
| 29 | + 0 15px 15px rgba(0, 0, 0, 0.3), |
| 30 | + inset 0 15px 15px rgba(0, 0, 0, 0.3); |
18 | 31 | } |
19 | 32 |
|
20 | | -.hand { |
21 | | - position: absolute; |
22 | | - background: #333; |
23 | | - border-radius: 50%; |
24 | | - transform-origin: bottom; |
25 | | - transform: rotate(90deg); |
26 | | - transition: transform 0.5s cubic-bezier(0.4, 2.3, 0.3, 1); |
| 33 | +.clock::before { |
| 34 | + content: ""; |
| 35 | + position: absolute; |
| 36 | + width: 15px; |
| 37 | + height: 15px; |
| 38 | + background: #848484; |
| 39 | + border: 2px solid #fff; |
| 40 | + z-index: 10; |
| 41 | + border-radius: 50%; |
27 | 42 | } |
28 | 43 |
|
29 | | -.hour { |
30 | | - width: 6px; |
31 | | - height: 80px; |
32 | | - left: 50%; |
33 | | - top: 50%; |
34 | | - transform: translateX(-50%); |
35 | | - background: #333; |
| 44 | +.hour, |
| 45 | +.min, |
| 46 | +.sec { |
| 47 | + position: absolute; |
| 48 | +} |
| 49 | + |
| 50 | +.hour, |
| 51 | +.hr { |
| 52 | + width: 160px; |
| 53 | + height: 160px; |
| 54 | +} |
| 55 | + |
| 56 | +.min, |
| 57 | +.mn { |
| 58 | + height: 190px; |
| 59 | +} |
| 60 | + |
| 61 | + |
| 62 | +.hr, |
| 63 | +.mn, |
| 64 | +.sc { |
| 65 | + display: flex; |
| 66 | + justify-content: center; |
| 67 | + border-radius: 50%; |
36 | 68 | } |
37 | 69 |
|
38 | | -.minute { |
39 | | - width: 4px; |
40 | | - height: 110px; |
41 | | - left: 50%; |
42 | | - top: 50%; |
43 | | - transform: translateX(-50%); |
44 | | - background: #666; |
| 70 | +.hr::before { |
| 71 | + content: ""; |
| 72 | + position: absolute; |
| 73 | + width: 8px; |
| 74 | + height: 80px; |
| 75 | + background: #848484; |
| 76 | + z-index: 1; |
| 77 | + border-radius: 6px 6px 0 0; |
45 | 78 | } |
46 | 79 |
|
47 | | -.second { |
48 | | - width: 2px; |
49 | | - height: 120px; |
50 | | - left: 50%; |
51 | | - top: 50%; |
52 | | - transform: translateX(-50%); |
53 | | - background: red; |
| 80 | +.mn::before { |
| 81 | + content: ""; |
| 82 | + position: absolute; |
| 83 | + width: 4px; |
| 84 | + height: 90px; |
| 85 | + background: #d6d6d6; |
| 86 | + z-index: 2; |
| 87 | + border-radius: 6px 6px 0 0; |
54 | 88 | } |
55 | 89 |
|
56 | | -.center { |
57 | | - position: absolute; |
58 | | - width: 14px; |
59 | | - height: 14px; |
60 | | - background: #333; |
61 | | - border-radius: 50%; |
62 | | - left: 50%; |
63 | | - top: 50%; |
64 | | - transform: translate(-50%, -50%); |
| 90 | +.sc::before { |
| 91 | + content: ""; |
| 92 | + position: absolute; |
| 93 | + width: 2px; |
| 94 | + height: 150px; |
| 95 | + background: #ff6767; |
| 96 | + z-index: 3; |
| 97 | + border-radius: 6px 6px 0 0; |
65 | 98 | } |
0 commit comments