Gradient Burst Stepper - 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>Gradient Burst Stepper</title> <style> body { font-family: 'Arial', sans-serif; background: radial-gradient(circle, rgba(63,94,251,1) 0%, rgba(252,70,107,1) 100%); display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; } .stepper { display: flex; position: relative; margin: 20px 0; } .step { position: relative; width: 100px; height: 100px; border: 5px solid #fff; border-radius: 50%; background: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%); display: flex; justify-content: center; align-items: center; color: #fff; font-size: 1.5em; transition: transform 0.3s ease-in-out; } .step.active { background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%); transform: scale(1.2); box-shadow: 0 0 20px rgba(0, 0, 0, 0.3); } .step.complete { background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%); transform: scale(1); } .step .icon { font-size: 2em; } .step .number { font-size: 1.2em; } .line { position: absolute; top: 50%; left: 50px; width: calc(100% - 200px); height: 5px; background: #fff; z-index: -1; } .step:hover { cursor: pointer; animation: spin 0.5s linear infinite; } @keyframes spin { 100% { transform: rotate(360deg); } } @keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); } 100% { box-shadow: 0 0 0 20px rgba(255, 255, 255, 0); } } .step.active .icon { animation: pulse 1.5s infinite; } </style> </head> <body> <div class="stepper"> <div class="step active" data-step="1"> <div class="number">1</div> </div> <div class="line"></div> <div class="step" data-step="2"> <div class="number">2</div> </div> <div class="line"></div> <div class="step" data-step="3"> <div class="number">3</div> </div> </div> <script> const steps = document.querySelectorAll('.step'); let currentStep = 1; steps.forEach(step => { step.addEventListener('click', () => { const stepNumber = parseInt(step.getAttribute('data-step')); if (stepNumber <= currentStep + 1) { steps.forEach((s, index) => { s.classList.remove('active'); s.classList.remove('complete'); if (index < stepNumber - 1) { s.classList.add('complete'); } }); step.classList.add('active'); currentStep = stepNumber; } }); }); </script> </body> </html>