A beautiful, beginner-friendly digital clock web app with modern glassmorphism design, animated background, glowing text, and powerful featuresβbuilt using just HTML, CSS, and vanilla JavaScript.
- Modern Design β Glassmorphism effect with blur & transparency
- Gradient Background β Animated gradient and subtle particles
- Glowing Text β Time displays a cyan glow
- Responsive Layout β Perfect on mobile, tablet, desktop
- Smooth Animations β Blinking colon & gentle glow
- Real-Time Updates β Clock updates every second
- 12H/24H Toggle β Click button or press SPACEBAR to switch formats
- Current Date β Full date shown below time
- Timezone Display β Shows your current timezone
- Seconds Display β Small seconds counter included
- Keyboard Shortcut β Toggle format with SPACEBAR
- Clean Code β Well-commented & organized for learning
- CSS Variables β Easily customize colors
- Responsive Design β Works on all screens
- No Dependencies β Pure HTML, CSS, JS
Change colors by editing these CSS variables at the top of digital-clock.html:
:root {
--primary-color: #00d4ff; /* Main clock color */
--secondary-color: #0099cc; /* Secondary elements */
--background-dark: #0a0a0a; /* Dark background */
--background-light: #1a1a1a; /* Light background */
}- Open
digital-clock.htmlin any web browser. - The clock starts automatically!
- Toggle Format:
- Click the "Switch to 12H/24H" button
- Or press the SPACEBAR
- Enjoy!
- Full date, timezone, seconds, and smooth animations.
- Self-contained, well-documented, and super easy to customize.
- Perfect for beginners and anyone who loves beautiful clocks!
If you like this project, please consider giving a β star and sharing it with friends!
Found a bug? Need a feature? Open an issue
For questions or suggestions, reach out via Discussions
Made with π by reezmahanan
