Skip to content

golu19102003/Analog-Clock-Watch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🕒 Analog Clock – HTML, CSS & JavaScript:

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.

✨ Features:

🕰️ 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

📁 Project Structure:

analog-clock/ │── index.html # Main UI structure │── stylesheet.css # Clock design and styling └── script.js # Logic to rotate the hands in real-time

🚀 How It Works:

✔ 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.

▶️ How to Run:

-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

🧩 Sample Code Overview:

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.

📸 Screenshot (Optional Placeholder):

image

🛠 Possible Improvements:

You can enhance the project with:

🌙 Dark / Light Mode toggle

🌀 Smooth sweeping seconds hand

📅 Date & Day display

🧭 Theme customization options

🕹️ Digital + analog combined clock

About

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.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors