-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.css
132 lines (115 loc) · 3.57 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
:root {
--clock-padding: 86px; /* Define the padding variable */
--marker-offset: 20px; /* New offset variable to move markers down */
--vertical-offset: 10px; /* New variable to move numbers down */
--offset: 85px;
}
.marker {
position: absolute;
background-color: black;
transform-origin: 50% 100%;
}
.minute-marker {
width: 1.5px;
height: 5px; /* Shorter size for minute markers */
top: 95px;
}
.hour-marker {
width: 4px;
height: 5px; /* Longer size for hour markers */
top: 95px;
}
.clock {
position: relative;
width: 200px;
height: 200px;
border: 2px solid black;
border-radius: 50%;
margin: 50px auto;
background: white;
display: flex;
align-items: center;
justify-content: center;
}
.hand {
position: absolute;
bottom: 50%;
transform-origin: 50% 100%;
background-color: black;
z-index: 2; /* Higher to appear above the numbers */
border-radius: 2px; /* Applies a subtle roundness to all edges */
}
.hour {
width: 3.5px;
height: 58px; /* Shorter hand for hours */
/*border-radius: 50% 50% 2px 2px ;*/ /* Rounded on the top edges */
}
.minute {
width: 3px;
height: 73px; /* Longer hand for minutes */
/*border-radius: 60% 60% 1.9px 1.9px ;*/ /* Rounded on the top edges */
}
.second {
width: 2px;
height: 85px; /* Longest hand for seconds */
background-color: red; /* Typically the second hand is red */
z-index: 4; /* Higher to appear above the numbers */
/*border-radius: 50% 50% 1px 1px ;*/ /* Rounded on the top edges */
}
.numbers-container {
position: relative; /* Ensure this is positioned for z-index to work */
width: 100%; /* Should match the clock's dimensions */
height: 100%; /* Should match the clock's dimensions */
top: 0;
left: 0;
transform: translate(45%, 46%); /* This centers the container */
/* Move the whole container down by the offset amount */
/*transform: translateY(30px);*/
z-index: 1; /* Lower z-index since it's less important for interaction */
}
.number {
position: absolute;
width: 20px;
height: 20px;
text-align: center;
font-size: 14px;
font-family: Arial, sans-serif;
transform: translate(-50%, -50%) translateY(var(--vertical-offset)); /* Adjusted to move numbers down */
}
.center-circle {
position: absolute;
width: 10px; /* Size of the circle */
height: 10px; /* Size of the circle */
background-color: black; /* Color of the circle */
border-radius: 50%; /* Makes the div perfectly round */
top: 50%;
left: 50%;
transform: translate(-50%, -50%); /* Center the circle within the clock */
z-index: 3; /* Ensures it is above all hands */
}
.center-red-circle {
position: absolute;
width: 4.5px; /* Size of the circle */
height: 4.5px; /* Size of the circle */
background-color: red;
border-radius: 50%; /* Makes the div perfectly round */
top: 50%;
left: 50%;
transform: translate(-50%, -50%); /* Center the circle within the clock */
z-index: 4; /* Ensures it is above all hands */
}
.button-container {
position: relative; /* This also needs to be positioned */
text-align: center; /* Centers the buttons inside the container */
margin-top: 20px; /* Adds some space above the buttons, adjust as needed */
z-index: 4; /* Ensures it is above all hands */
}
.button-container button {
margin: 4px; /* Adds some space between the buttons */
padding: 5px 10px; /* Adds padding inside the buttons for better appearance */
z-index: 2; /* Higher z-index to ensure it's clickable */
}
#currentTime {
text-align: center;
margin-top: 20px; /* Adjust margin-top as needed */
}