Fireworks 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>Fireworks Cursor</title> <style> body { margin: 0; padding: 0; overflow: hidden; background-color: #000; cursor: none; } .firework { position: absolute; width: 5px; height: 5px; background-color: #ff0000; border-radius: 50%; pointer-events: none; animation: fireworkExplosion 1s ease-out; } @keyframes fireworkExplosion { 0% { transform: scale(1); opacity: 1; } 100% { transform: scale(5); opacity: 0; } } </style> </head> <body> <script> document.addEventListener('mousemove', (e) => { const firework = document.createElement('div'); firework.className = 'firework'; firework.style.left = `${e.pageX}px`; firework.style.top = `${e.pageY}px`; document.body.appendChild(firework); setTimeout(() => firework.remove(), 1000); }); </script> </body> </html>