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