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