Rainbow Trails 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>Rainbow Trails Cursor</title> <style> body { margin: 0; overflow: hidden; background: #000; } .trail { position: absolute; width: 8px; height: 8px; background: red; border-radius: 50%; pointer-events: none; animation: rainbow 1s linear infinite; } @keyframes rainbow { 0% { background: red; } 16% { background: orange; } 33% { background: yellow; } 50% { background: green; } 66% { background: blue; } 83% { background: indigo; } 100% { background: violet; } } </style> </head> <body> <script> document.addEventListener('mousemove', function(e) { const trail = document.createElement('div'); trail.className = 'trail'; trail.style.left = `${e.pageX}px`; trail.style.top = `${e.pageY}px`; document.body.appendChild(trail); setTimeout(() => trail.remove(), 1000); }); </script> </body> </html>