🧠 Description
This project demonstrates a stylish animated 404 error page built using Bootstrap, custom CSS, and JavaScript.
The page features a rolling number animation where random digits spin before settling into 404, combined with skewed clipping effects and shadow layers that add depth and motion. A minimal message bubble (“OH!”) enhances the visual feedback when users land on a missing page.
The layout is fully responsive and adapts seamlessly across desktop and mobile devices, making it suitable for modern websites and dashboards.
💻 HTML Code
The HTML structure is divided into clean, logical sections:
Bootstrap grid system handles layout and alignment.
.container-error-404 holds the animated digits.
Each digit is wrapped inside .clip and .shadow containers to enable skew and shadow effects.
.digit spans are dynamically filled using JavaScript.
The .msg bubble adds a playful visual cue next to the digits.
A heading communicates the error message clearly to the user.
This separation allows CSS and JavaScript to work independently yet cohesively.
CSS Code
This CSS file is responsible for the visual depth and illusion effects.
How it works:
Skewed Clipping Effect
.clip elements are skewed negatively.
Inner .digit elements are skewed back to appear straight.
Shadow & Depth
Inner shadows and gradients simulate depth between digits.
Circular Digits
Each number is displayed as a circular badge using border-radius: 50%.
Responsive Design
Media queries scale down digit size, message bubble, and spacing for mobile devices.
Framework Utilities
Additional spacing and layout helper classes improve consistency and flexibility.
Javascipt Code
The JavaScript adds a slot-machine style rolling animation to the digits.
Logic Breakdown:
randomNum() generates random digits from 1–9.
Each digit runs inside a setInterval() loop.
Digits stop at staggered intervals to create a cascading effect.
Final values settle into 404, reinforcing the error state.
This subtle animation enhances engagement without overwhelming the user.
