CSS Clock Loader
A tiny clock face whose hands spin while you wait.
HTML
<div class="clock-loader" role="status" aria-label="Loading"></div>
CSS
.clock-loader {
position: relative;
width: 44px;
height: 44px;
border: 4px solid #ea580c;
border-radius: 50%;
}
.clock-loader::before,
.clock-loader::after {
content: "";
position: absolute;
left: calc(50% - 2px);
bottom: 50%;
width: 4px;
border-radius: 2px;
background: #ea580c;
transform-origin: 50% 100%;
animation: clock-spin linear infinite;
}
/* Minute hand */
.clock-loader::before {
height: 15px;
animation-duration: 1s;
}
/* Hour hand */
.clock-loader::after {
height: 10px;
animation-duration: 12s;
}
@keyframes clock-spin {
to { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
.clock-loader::before {
animation-duration: 4s;
}
}
About this CSS Clock Loader
This CSS Clock Loader is 42 lines of pure CSS (0.7 KB) with no JavaScript and no dependencies. It uses keyframe animations, transforms and reduced-motion support. It works in current versions of Chrome, Edge, Safari and Firefox. It works in any stack: plain HTML, React, Vue, Svelte, Astro, WordPress or Webflow.
CSS features used
Customize it
The colors in this snippet. Search and replace them to match your brand:
#ea580c
How to use this clock loader
- Copy the HTML and paste it where you want the element to appear.
- Copy the CSS into your stylesheet, or inside a
<style>tag. - Keep the
.clock-loaderclass name, or rename it in both places. Then tweak colors, sizes and timing to match your design. - Using React or Next.js? Change
classtoclassNamein the HTML. The CSS works as is, including in Tailwind projects (put it in your global stylesheet).
Building with an AI tool?
“Copy for AI” copies a short prompt for Cursor, Claude Code, Lovable, Bolt or v0. Your AI tool opens the Markdown version of this snippet and reads the HTML, CSS and setup notes there. If your tool can't open links, with the code instead. More ways to use copy CSS with AI.