Custom Sparkling 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>Custom Sparkling Cursor</title> <style> body { margin: 0; overflow: hidden; background: #000; } .spark { position: absolute; width: 5px; height: 5px; background: rgba(255, 255, 255, 0.8); border-radius: 50%; pointer-events: none; animation: sparkle 1s linear infinite; } @keyframes sparkle { from { transform: scale(1); opacity: 1; } to { transform: scale(2); opacity: 0; } } </style> </head> <body> <script> document.addEventListener('mousemove', function(e) { for (let i = 0; i < 10; i++) { const spark = document.createElement('div'); spark.className = 'spark'; spark.style.left = `${e.pageX}px`; spark.style.top = `${e.pageY}px`; document.body.appendChild(spark); setTimeout(() => spark.remove(), 1000); } }); </script> </body> </html>