-
Notifications
You must be signed in to change notification settings - Fork 0
/
style.css
141 lines (118 loc) · 2.47 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
133
134
135
136
137
138
139
140
141
/* If you want a simple clock you can stop the animation of color changing. */
*{
margin: 0;
padding: 0;
}
/* Centering the clock */
body{
background: rgb(30, 30, 30);
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
}
/* Main container of clock and colors */
.glow-container{
position: relative;
background: black;
height: 30vw;
width: 30vw;
border-radius: 50%;
/* Done for changing color */
animation: animate 4s linear infinite;
box-shadow:
0 0 7px white,
0 0 10px white,
0 0 21px white,
0 0 15px white,
0 0 18px white,
0 0 42px red,
0 0 82px rgb(255, 0, 0),
0 0 92px rgb(253, 44, 44),
0 0 200px rgb(247, 74, 74);
}
/* Changing color */
@keyframes animate {
0%{
filter: hue-rotate(0deg);
}
100%{
filter: hue-rotate(360deg);
}
}
/* For responsiveness */
@media screen and (max-width:700px){
.glow-container{
height: 50vw;
width: 50vw;
}
}
.clock{
display: flex;
justify-content: center;
align-items: center;
position: relative;
background: url("image/clock.png") no-repeat;
background-size: cover;
height: 100%;
width: 100%;
}
/* Adding white circle at center */
.clock::before{
content: "";
background: white;
z-index: 100;
width: 15px;
height: 15px;
border-radius: 50%;
}
/* Setting the properties of hands */
.clock .hr, .min, .sec{
position: absolute;
display: flex;
justify-content: center;
border-radius: 50%;
}
.hr{
width: 70%;
height: 50%;
}
.min{
width: 59%;
height: 72%;
}
.sec{
width: 28%;
height: 100%;
}
/* Setting the size of each clock hand. I done it using chrome devtool you can do the same mess around a bit and adjust the size of your like */
.hr::before{
content: "";
position: absolute;
width: 4%;
height: 35%;
top: 15%;
background: red;
border-radius: 9px 9px 0 0;
z-index: 10;
}
.min::before{
content: "";
position: absolute;
width: 4%;
height: 35%;
top: 15%;
background: green;
border-radius: 9px 9px 0 0;
z-index: 10;
}
.sec::before{
content: "";
position: absolute;
width: 4%;
height: 48%;
top: 15%;
background: yellow;
border-radius: 9px 9px 0 0;
z-index: 10;
}