Animated Loader by codepeek
Zoom
Saved
1 line⌘Z Undo
1<!--2 Author: @codepeek3 License: MIT4 Tags: #animated #editorial #light #mechanical #minimal5-->6<div class="scl" role="status">7 <span class="scl__sr">Loading…</span>8 <div class="scl__face" aria-hidden="true">9 <span class="scl__hand scl__hand--hour">10 </span>11 <span class="scl__hand scl__hand--min">12 </span>13 <span class="scl__hand scl__hand--sec">14 </span>15 </div>16</div>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<!--
Author: @codepeek
License: MIT
Tags: #animated #editorial #light #mechanical #minimal
-->
<div class="scl" role="status">
<span class="scl__sr">Loading…</span>
<div class="scl__face" aria-hidden="true">
<span class="scl__hand scl__hand--hour">
</span>
<span class="scl__hand scl__hand--min">
</span>
<span class="scl__hand scl__hand--sec">
</span>
</div>
</div>1/* * Author: @codepeek * License: MIT * Tags: #animated #editorial #light #mechanical #minimal */2.scl {3 position: relative;4 display: inline-grid;5 place-items: center;6 width: 190px;7 height: 190px;8}9.scl__sr {10 position: absolute;11 width: 1px;12 height: 1px;13 overflow: hidden;14 clip-path: inset(50%);15 white-space: nowrap;16}17.scl__face {18 position: relative;19 width: 160px;20 aspect-ratio: 1;21 border-radius: 50%;22 background: radial-gradient(circle, #fdfdfb 60%, #efede7);23 box-shadow: 0 0 0 7px #202020, 0 0 0 9px #9a9a9a, 0 0 0 10px #5c5c5c, 0 16px 28px 4px rgba(0, 0, 0, 0.22);24}25.scl__face::before, .scl__face::after {26 content: "";27 position: absolute;28 inset: 7px;29 border-radius: 50%;30}31.scl__face::before {32 background: repeating-conic-gradient(from -0.6deg, #151515 0 1.2deg, transparent 1.2deg 6deg);33 -webkit-mask: radial-gradient(closest-side, transparent 89%, #000 89.5%);34 mask: radial-gradient(closest-side, transparent 89%, #000 89.5%);35}36.scl__face::after {37 background: repeating-conic-gradient(from -2deg, #151515 0 4deg, transparent 4deg 30deg);38 -webkit-mask: radial-gradient(closest-side, transparent 72%, #000 72.5%);39 mask: radial-gradient(closest-side, transparent 72%, #000 72.5%);40}41.scl__hand {42 position: absolute;43 z-index: 1;44 left: 50%;45 bottom: 50%;46 translate: -50% 0;47 transform-origin: 50% 100%;48 background: #151515;49}50.scl__hand--hour {51 width: 9px;52 height: 46px;53 clip-path: polygon(22% 0, 78% 0, 100% 100%, 0 100%);54 rotate: 296deg;55}56.scl__hand--min {57 width: 7px;58 height: 66px;59 clip-path: polygon(25% 0, 75% 0, 100% 100%, 0 100%);60 animation: scl-min 144s steps(60) infinite;61}62.scl__hand--sec {63 width: 2px;64 height: 70px;65 bottom: calc(50% - 18px);66 transform-origin: 50% calc(100% - 18px);67 background: #c8221a;68 animation: scl-sec 2.4s linear infinite;69}70.scl__hand--sec::before, .scl__hand--sec::after {71 content: "";72 position: absolute;73 left: 50%;74 border-radius: 50%;75 background: #c8221a;76 translate: -50% 0;77}78.scl__hand--sec::before {79 top: -4px;80 width: 14px;81 height: 14px;82}83.scl__hand--sec::after {84 bottom: 14px;85 width: 8px;86 height: 8px;87}88@keyframes scl-sec {89 0% {90 rotate: 0deg;91 }92 85%, 100% {93 rotate: 360deg;94 }95}96@keyframes scl-min {97 from {98 rotate: 312deg;99 }100 to {101 rotate: 672deg;102 }103}104@media (prefers-reduced-motion: reduce) {105 .scl__hand--sec, .scl__hand--min {106 animation: none;107 rotate: 318deg;108 }109 .scl__hand--sec {110 rotate: 40deg;111 }112}
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
/* * Author: @codepeek * License: MIT * Tags: #animated #editorial #light #mechanical #minimal */
.scl {
position: relative;
display: inline-grid;
place-items: center;
width: 190px;
height: 190px;
}
.scl__sr {
position: absolute;
width: 1px;
height: 1px;
overflow: hidden;
clip-path: inset(50%);
white-space: nowrap;
}
.scl__face {
position: relative;
width: 160px;
aspect-ratio: 1;
border-radius: 50%;
background: radial-gradient(circle, #fdfdfb 60%, #efede7);
box-shadow: 0 0 0 7px #202020, 0 0 0 9px #9a9a9a, 0 0 0 10px #5c5c5c, 0 16px 28px 4px rgba(0, 0, 0, 0.22);
}
.scl__face::before, .scl__face::after {
content: "";
position: absolute;
inset: 7px;
border-radius: 50%;
}
.scl__face::before {
background: repeating-conic-gradient(from -0.6deg, #151515 0 1.2deg, transparent 1.2deg 6deg);
-webkit-mask: radial-gradient(closest-side, transparent 89%, #000 89.5%);
mask: radial-gradient(closest-side, transparent 89%, #000 89.5%);
}
.scl__face::after {
background: repeating-conic-gradient(from -2deg, #151515 0 4deg, transparent 4deg 30deg);
-webkit-mask: radial-gradient(closest-side, transparent 72%, #000 72.5%);
mask: radial-gradient(closest-side, transparent 72%, #000 72.5%);
}
.scl__hand {
position: absolute;
z-index: 1;
left: 50%;
bottom: 50%;
translate: -50% 0;
transform-origin: 50% 100%;
background: #151515;
}
.scl__hand--hour {
width: 9px;
height: 46px;
clip-path: polygon(22% 0, 78% 0, 100% 100%, 0 100%);
rotate: 296deg;
}
.scl__hand--min {
width: 7px;
height: 66px;
clip-path: polygon(25% 0, 75% 0, 100% 100%, 0 100%);
animation: scl-min 144s steps(60) infinite;
}
.scl__hand--sec {
width: 2px;
height: 70px;
bottom: calc(50% - 18px);
transform-origin: 50% calc(100% - 18px);
background: #c8221a;
animation: scl-sec 2.4s linear infinite;
}
.scl__hand--sec::before, .scl__hand--sec::after {
content: "";
position: absolute;
left: 50%;
border-radius: 50%;
background: #c8221a;
translate: -50% 0;
}
.scl__hand--sec::before {
top: -4px;
width: 14px;
height: 14px;
}
.scl__hand--sec::after {
bottom: 14px;
width: 8px;
height: 8px;
}
@keyframes scl-sec {
0% {
rotate: 0deg;
}
85%, 100% {
rotate: 360deg;
}
}
@keyframes scl-min {
from {
rotate: 312deg;
}
to {
rotate: 672deg;
}
}
@media (prefers-reduced-motion: reduce) {
.scl__hand--sec, .scl__hand--min {
animation: none;
rotate: 318deg;
}
.scl__hand--sec {
rotate: 40deg;
}
}Changes made here are only a live preview and will not be saved.
Save to GitHub
GitHub opens a new file in your repository with this element filled in. Review it there and press Commit changes. Nothing is sent from codepeek and no GitHub access is needed.
◉ 1 views
Build it with AIA ready prompt with the code, the credit and how to adapt it to your project.
A railway platform clock: the red-disc second hand sweeps, pauses at twelve, then the minute hand jumps one tick.
Choose where to donate
Select a platform to continue.
Community
Comments 0
Code copied
SUPPORT THE CREATOR
Would you like to donate to the creator to help them keep creating content?
You need to sign in before you can write a comment.