Toggle navigation
☰
HTML
CSS
Scripting
Database
<!doctype html> <title>Example</title> <style> body { display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; font-family: sans-serif; background-color: #f0f0f0; } .progress-container { width: 300px; height: 20px; background-color: #e9ecef; border-radius: 10px; overflow: hidden; } .progress-bar { height: 100%; background-color: #28a745; width: 0%; animation: fill-bar 3s cubic-bezier(0.4, 0, 0.2, 1) forwards; } @keyframes fill-bar { 0% { width: 0%; } 40% { width: 30%; } /* Simulate a pause in loading */ 60% { width: 50%; } 80% { width: 90%; } 100% { width: 100%; } } @media (prefers-reduced-motion: reduce) { .progress-bar { /* Optional: Still show progress, but snap in large chunks rather than a smooth slide */ /* Note: For a real progress bar driven by JS, you'd just use steps() or transition: none */ animation-timing-function: steps(4, end); } } </style> <div class="progress-container" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100"> <div class="progress-bar"></div> </div>