Modern Progressbar - MeggiTools
Run
Toggle Theme
Share Link
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Modern Progressbar</title> <style> body { font-family: 'Arial', sans-serif; background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%); display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; } .progress-container { width: 80%; max-width: 600px; background: #fff; border-radius: 10px; box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1); overflow: hidden; position: relative; } .progress-bar { display: flex; height: 50px; border-radius: 10px; overflow: hidden; position: relative; background: linear-gradient(90deg, #ff9a9e 0%, #fecfef 100%); } .progress-bar-fill { width: 0; height: 100%; background: linear-gradient(90deg, #f6d365 0%, #fda085 100%); border-radius: 10px; display: flex; align-items: center; justify-content: center; transition: width 0.5s ease-in-out; } .progress-bar-fill::before { content: '🚀'; font-size: 24px; margin-right: 10px; animation: bounce 1s infinite; } .progress-bar-fill::after { content: attr(data-progress) '%'; font-size: 18px; font-weight: bold; color: #fff; } @keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } } .progress-icon { position: absolute; right: 10px; top: 10px; font-size: 24px; } .progress-text { text-align: center; padding: 10px 0; font-size: 18px; font-weight: bold; } .progress-controls { display: flex; justify-content: center; padding: 10px; } .progress-controls button { background: #6a11cb; background: -webkit-linear-gradient(to right, #2575fc, #6a11cb); background: linear-gradient(to right, #2575fc, #6a11cb); border: none; color: #fff; padding: 10px 20px; margin: 0 5px; border-radius: 5px; cursor: pointer; transition: background 0.3s; } .progress-controls button:hover { background: #2575fc; } </style> </head> <body> <div class="progress-container"> <div class="progress-bar"> <div class="progress-bar-fill" data-progress="0"></div> </div> <div class="progress-icon">🎯</div> <div class="progress-text">Loading...</div> <div class="progress-controls"> <button onclick="startProgress()">Start</button> <button onclick="resetProgress()">Reset</button> </div> </div> <script> function startProgress() { const progressBarFill = document.querySelector('.progress-bar-fill'); let progress = 0; const interval = setInterval(() => { progress += 1; if (progress > 100) { clearInterval(interval); document.querySelector('.progress-text').innerText = 'Completed!'; } else { progressBarFill.style.width = progress + '%'; progressBarFill.setAttribute('data-progress', progress); } }, 50); } function resetProgress() { const progressBarFill = document.querySelector('.progress-bar-fill'); progressBarFill.style.width = '0'; progressBarFill.setAttribute('data-progress', '0'); document.querySelector('.progress-text').innerText = 'Loading...'; } </script> </body> </html>