Firefly 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>Firefly Cursor</title> <style> body { margin: 0; padding: 0; overflow: hidden; background-color: #222; cursor: none; } .cursor { position: absolute; width: 10px; height: 10px; background-color: #ffff00; border-radius: 50%; pointer-events: none; box-shadow: 0 0 10px #ffff00, 0 0 20px #ffff00; animation: firefly 2s infinite alternate; } @keyframes firefly { 0% { transform: translateY(-10px); } 100% { transform: translateY(10px); } } </style> </head> <body> <div class="cursor" id="cursor"></div> <script> document.addEventListener('mousemove', (e) => { const cursor = document.getElementById('cursor'); cursor.style.left = `${e.pageX}px`; cursor.style.top = `${e.pageY}px`; }); </script> </body> </html>