Color 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>Color Trail Cursor</title> <style> body { margin: 0; padding: 0; overflow: hidden; background-color: #111; cursor: none; } .cursor { position: absolute; width: 8px; height: 8px; background-color: #ff0000; border-radius: 50%; pointer-events: none; box-shadow: 0 0 5px #ff0000, 0 0 10px #ff0000; animation: colorTrail 2s infinite alternate; } @keyframes colorTrail { 0% { background-color: #ff0000; } 25% { background-color: #ff9900; } 50% { background-color: #00ff00; } 75% { background-color: #0000ff; } 100% { background-color: #ff00ff; } } </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>