Gradient Ring 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>Gradient Ring Cursor</title> <style> body { margin: 0; padding: 0; overflow: hidden; background-color: #333; cursor: none; } .cursor { position: absolute; width: 20px; height: 20px; border: 2px solid transparent; border-radius: 50%; background: linear-gradient(45deg, #ff0000, #ff9900, #00ff00, #0000ff, #ff00ff); background-clip: padding-box; pointer-events: none; animation: rotate 2s linear infinite; } @keyframes rotate { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } </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>