Color Burst Cursor - 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>Color Burst Cursor</title> <style> body { margin: 0; overflow: hidden; background: #000; } .burst { position: absolute; width: 10px; height: 10px; background: red; border-radius: 50%; pointer-events: none; animation: burst 0.5s linear infinite; } @keyframes burst { from { transform: translate(0, 0) scale(1); opacity: 1; background: red; } to { transform: translate(calc(var(--dx) * 20px), calc(var(--dy) * 20px)) scale(0.5); opacity: 0; background: yellow; } } </style> </head> <body> <script> document.addEventListener('mousemove', function(e) { for (let i = 0; i < 10; i++) { const burst = document.createElement('div'); burst.className = 'burst'; burst.style.setProperty('--dx', (Math.random() - 0.5) * 2); burst.style.setProperty('--dy', (Math.random() - 0.5) * 2); burst.style.left = `${e.pageX}px`; burst.style.top = `${e.pageY}px`; document.body.appendChild(burst); setTimeout(() => burst.remove(), 500); } }); </script> </body> </html>