---
title: "Clock Preloader"
description: "HTML CSS to create a clock with Animation"
url: "https://www.geekboots.com/css/clock-preloader"
markdown_url: "https://www.geekboots.com/css/clock-preloader/md"
category: "CSS"
author: "Geekboots"
published: "2022-08-19"
updated: "2026-11-26T08:21:58.920Z"
tags: ["CSS", "Preloader", "Loading animation", "HTML", "keyframes animation", "web design"]
---

# Clock Preloader (CSS)

> HTML CSS to create a clock with Animation

## Explanation



## Source Code

### clock-preloader.html

```html
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Clock Pre-loader</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        body {
            background-color: #292929;
        }

        section {
            display: flex;
            justify-content: center;
            align-items: center;
            width: 100%;
            height: 100vh;
        }

        ul.clock {
            width: 200px;
            height: 200px;
            background-color: #fafafa59;
            border-radius: 100%;
            position: relative;
            list-style: none;
        }

        ul.clock::before {
            position: absolute;
            content: '';
            width: 8px;
            height: 8px;
            border-radius: 100%;
            background-color: #fff;
            left: calc(50% - 4px);
            top: calc(50% - 4px);
            z-index: 5;
        }
        

        ul.clock li:first-child {
            position: absolute;
            height: 4px;
            width: 40%;
            right: 50%;
            top: calc(50% - 2px);
            border-radius: 40px;
            transform-origin: right center;
            background-color: #fff;   
            animation: ani 1s infinite linear;
        }

        ul.clock li:last-child {
            position: absolute;
            height: 4px;
            width: 25%;
            right: 50%;
            top: calc(50% - 2px);
            border-radius: 40px;
            transform-origin: right center;
            background-color: #fff;   
            animation: ani 15s infinite linear;
        }

        @keyframes ani {
            0% {
                transform: rotate(0deg);
            }

            100% {
                transform: rotate(360deg);
            }
        }
        
    </style>
</head>
<body>
    <section>
        <ul class="clock">
            <li></li>
            <li></li>
        </ul>
    </section>
</body>
</html>
```

## Related Code Examples

- [Understanding CSS Shadows: box-shadow vs drop-shadow](https://www.geekboots.com/css/understanding-css-shadows-box-shadow-vs-drop-shadow) ([Markdown](https://www.geekboots.com/css/understanding-css-shadows-box-shadow-vs-drop-shadow/md))
- [Attractive Mobile Responsive Navigation](https://www.geekboots.com/css/attractive-mobile-responsive-navigation) ([Markdown](https://www.geekboots.com/css/attractive-mobile-responsive-navigation/md))
- [Animated Bell Notification Icon](https://www.geekboots.com/css/animated-bell-notification-icon) ([Markdown](https://www.geekboots.com/css/animated-bell-notification-icon/md))
- [Cool Splash Image Effect in CSS](https://www.geekboots.com/css/cool-splash-image-effect-in-css) ([Markdown](https://www.geekboots.com/css/cool-splash-image-effect-in-css/md))
- [Edit Image with CSS filter](https://www.geekboots.com/css/edit-image-with-css-filter) ([Markdown](https://www.geekboots.com/css/edit-image-with-css-filter/md))
- [Menubar with Top Border Animations](https://www.geekboots.com/css/menubar-with-top-border-animations) ([Markdown](https://www.geekboots.com/css/menubar-with-top-border-animations/md))
- [Link Hover Animation](https://www.geekboots.com/css/link-hover-animation) ([Markdown](https://www.geekboots.com/css/link-hover-animation/md))
- [Menu Bar with Descriptive Menus](https://www.geekboots.com/css/menu-bar-with-descriptive-menus) ([Markdown](https://www.geekboots.com/css/menu-bar-with-descriptive-menus/md))

---
Source: [Geekboots](https://www.geekboots.com/css/clock-preloader)
