-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclock.css
More file actions
192 lines (189 loc) · 3.78 KB
/
clock.css
File metadata and controls
192 lines (189 loc) · 3.78 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
*{
padding: 0;
margin: 0;
box-sizing: border-box;
}
body
{
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
background-color:#2f363e;
}
.container
{
position: relative;
background: color #2f363e;;
/*min-height: 500px;*/
border-radius: 20px;
border-top-left-radius: 225px;
border-top-right-radius: 225px;
box-shadow: 25px 25px 75px rgb(0, 0, 0),
10px 10px 70px rgba(0, 0, 0,0.25);
inset: 5px 5px 10px rgba(0,0,0,0.5);
inset: 5px 5px 20px rgba(0,0,0,0.2);
inset: -5px -5px 15px rgba(0,0,0,0.75);
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
#analogClock
{
position: relative;
width: 350px;
height: 350px;
background-color:#2f363e;
border-radius: 50%;
box-shadow: 10px 50px 70px rgba(0, 0, 0,0.25);
inset: 5px 5px 10px rgba(0,0,0,0.5);
inset: 5px 5px 20px rgba(0,0,0,0.2);
inset: -5px -5px 15px rgba(0,0,0,0.75);
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 30px;
}
#analogClock::before
{
/*making a small white circle for pins*/
content: '';
position: absolute;
width: 8px;
height: 8px;
background-color:#2f363e;
border: 3px solid rgb(255, 134, 134);
border-radius: 50%;
z-index: 100000;
}
#analogClock span
{
position: absolute;
inset: 20px;
color: rgb(255, 255, 255);
text-align: center;
/*set variable --i in circular shape
360/12=30deg*/
transform: rotate(calc(30deg * var(--i)));
}
#analogClock span b
{
font-size: 1.60rem;
opacity: 0.5;
font-weight: 600;
display: inline-block;
transform: rotate(calc(-30deg * var(--i)));
}
.circle
{
position: absolute;
width: 230px;
height: 230px;
border: 2px solid rgba(0, 0, 0,0.25);
border-radius: 50%;
display: flex;
justify-content: center;
align-items: flex-start;
z-index: 10;
}
/*add colorfull dots above pins*/
.circle::before
{
content: '';
position: absolute;
background-color: var(--clr);
width: 8px;
height: 8px;
border-radius: 50%;
box-shadow: 0 0 20px var(--clr),
0 0 40px var(--clr);
z-index: 100000;
}
.circle i
{
position: absolute;
width: 5px;
height: 50%;
background: var(--clr);
transform-origin: bottom;
transform: scaley(0.5);
box-shadow: 0 0 8px var(--clr),
0 0 10px var(--clr);
}
/* green pin seconds*/
.circle:nth-child(1) i
{
width: 1px;
}
/*yello pin minutes*/
.circle2:nth-child(2) i
{
width: 3px;
}
/*red pin hours*/
.circle3:nth-child(3) i
{
width: 6px;
}
.circle2
{
position: absolute;
width: 185px;
height: 185px;
z-index: 9;
}
.circle3
{
position: absolute;
width: 140px;
height: 140px;
border-radius: 50%;
z-index: 8;
}
/*digitsl analogClock styling*/
@font-face
{
font-family: 'Digital-7';
src: url('./digital-7.ttf') format('truetype');
}
#digitalClock{
margin-bottom: 25px;
display: flex;
padding:10px 20px ;
font-weight: 600;
font-size: 1.5em;
border: none;
border-radius: 8px;
box-shadow: 5px 15px 30px rgba(0, 0, 0, 0.9);
font-family: "Digital-7";
}
#digitalClock div{
position: relative;
text-align: center;
border: none;
width: 50px;
background: transparent;
color: var(--clr);
text-shadow: 0 0 10px var(--clr), 0 0 50px var(--clr), 0 0 100px var(--clr);
}
#digitalClock div:nth-child(1)::after,
#digitalClock div:nth-child(2)::after{
content: ':';
position: absolute;
right: -4px;
color: gray;
}
#digitalClock div:nth-child(1)::after,
#digitalClock div:nth-child(2)::after
{
animation: animate 1s steps(1) infinite;
}
@keyframes animate{
0%{
opacity: 1;
}
50%{
opacity: 0;
}
}