A beautifully designed analog clock built using HTML, CSS, and JavaScript. This project displays a fully functional clock with hour, minute, and second hands, rotating in real-time based on the user’s system time.
🕰️ Real-time analog clock
🎨 Modern neon-glow UI with smooth visual styling
⚙️ Accurate hand rotation based on system time
💡 Pure HTML, CSS & JavaScript—no external libraries
📱 Fully responsive layout
🔄 Smooth hand movement using CSS transforms
analog-clock/ │── index.html # Main UI structure │── stylesheet.css # Clock design and styling └── script.js # Logic to rotate the hands in real-time
✔ HTML
Creates:
-The clock container 12 rotated number positions Hour, minute, and second hand elements
✔ CSS
Handles:
-Layout & circular clock design
-Neon glow effect
-Number positioning
-Smooth, centered clock hands
✔ JavaScript
-Updates the hands every second:
-Hour hand rotation: 30° × hours + 0.5° × minutes
-Minute hand rotation: 6° × minutes + 0.1° × seconds
-Second hand rotation: 6° × seconds
-Uses setInterval() to refresh every 1000ms.
-Download or copy the project files
-Keep index.html, stylesheet.css, and script.js in the same folder
-Open index.html in any modern browser
-The analog clock will start automatically
1. index.html
Defines the structure and hands of the clock.
2. stylesheet.css
Creates styling, circular shape, glow effect, and number placement.
3. script.js
Contains logic to rotate the hands based on current time.
You can enhance the project with:
🌙 Dark / Light Mode toggle
🌀 Smooth sweeping seconds hand
📅 Date & Day display
🧭 Theme customization options
🕹️ Digital + analog combined clock