Twinkling Stars Cursor - VexaX
Run Code
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>Twinkling Stars Cursor</title> <style> body { margin: 0; overflow: hidden; background: #000; } .star { position: absolute; width: 5px; height: 5px; background: white; border-radius: 50%; pointer-events: none; animation: twinkle 1s infinite alternate; } @keyframes twinkle { 0% { opacity: 1; transform: scale(1); } 100% { opacity: 0.5; transform: scale(0.5); } } </style> </head> <body> <script> document.addEventListener('mousemove', function(e) { const star = document.createElement('div'); star.className = 'star'; star.style.left = `${e.pageX}px`; star.style.top = `${e.pageY}px`; document.body.appendChild(star); setTimeout(() => star.remove(), 1000); }); </script> </body> </html>