-
Notifications
You must be signed in to change notification settings - Fork 105
/
Clock.html
64 lines (57 loc) · 1.32 KB
/
Clock.html
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
<html>
<head>
<title>Clock | Loaders</title>
<style>
*, *:before, *:after {
box-sizing: border-box;
}
body {
background: hsla(170, 50%, 45%, 1);
}
#clock {
width: 100px;
height: 100px;
border: 5px solid hsla(170, 50%, 75%, 1);
border-radius: 50%;
position: relative;
margin: 100px auto;
background: radial-gradient(circle at center, hsla(170, 50%, 75%, 1) 5px, transparent 5px);
}
#clock:before,
#clock:after {
content: '';
display: block;
position: absolute;
left: calc(50% - 3px);
bottom: calc(50%);
border-radius: 4px;
background: hsla(170, 50%, 75%, 1);
transform-origin: bottom;
animation-name: rotate;
animation-iteration-count: infinite;
animation-timing-function: linear;
}
#clock:before {
height: 26px;
width: 6px;
animation-duration: 8s;
}
#clock:after {
height: 40px;
width: 6px;
animation-duration: 4s;
}
@keyframes rotate {
from {
transform: rotate(0deg);
}
to {
transform: rotate(359deg)
}
}
</style>
</head>
<body>
<div id="clock"></div>
</body>
</html>