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