Color Changing Button - 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 Changing Button</title> <style> body { display: flex; justify-content: center; align-items: center; height: 100vh; background-color: #f0f0f0; margin: 0; } .color-changing-button { padding: 20px 40px; font-size: 18px; font-weight: bold; color: #fff; background: linear-gradient(45deg, #ff0000, #ff7300, #fffb00, #48ff00, #00ffd5, #002bff, #7a00ff, #ff00bf); background-size: 800%; border: none; border-radius: 30px; cursor: pointer; outline: none; animation: colorchange 8s linear infinite; transition: all 0.3s ease; } @keyframes colorchange { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } } .color-changing-button:hover { filter: brightness(1.2); } .color-changing-button span { position: relative; z-index: 1; } </style> </head> <body> <button type="button" class="color-changing-button"> <span>Color Changing</span> </button> </body> </html>