Highly Styled Circular Progress Bar - VexaX
Run Code
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>Highly Styled Circular Progress Bar</title> <style> body { display: flex; justify-content: center; align-items: center; height: 100vh; background: #f0f0f0; margin: 0; font-family: 'Arial', sans-serif; } .progress-container { position: relative; width: 200px; height: 200px; } .progress-container .emoji { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 3rem; } .progress { position: relative; width: 100%; height: 100%; border-radius: 50%; background: conic-gradient( #4caf50 0%, #4caf50 var(--progress), #ddd var(--progress) ); display: flex; justify-content: center; align-items: center; animation: spin 2s linear infinite; } .progress::before { content: ''; position: absolute; width: 90%; height: 90%; background: #fff; border-radius: 50%; } .progress .icon { position: absolute; font-size: 2rem; } .progress .icon:nth-child(1) { top: 10%; left: 50%; transform: translateX(-50%); } .progress .icon:nth-child(2) { right: 10%; top: 50%; transform: translateY(-50%); } .progress .icon:nth-child(3) { bottom: 10%; left: 50%; transform: translateX(-50%); } .progress .icon:nth-child(4) { left: 10%; top: 50%; transform: translateY(-50%); } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } </style> </head> <body> <div class="progress-container"> <div class="progress" style="--progress: 75%;"> </div> </div> <script> // JavaScript to handle dynamic progress update const progressElement = document.querySelector('.progress'); let progress = 0; function updateProgress() { progress += 1; if (progress > 100) progress = 0; progressElement.style.setProperty('--progress', `${progress}%`); requestAnimationFrame(updateProgress); } requestAnimationFrame(updateProgress); </script> </body> </html>