Rainbow 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>Rainbow Button</title> <style> body { display: flex; justify-content: center; align-items: center; height: 100vh; background-color: #1a1a1a; margin: 0; } .rainbow-button { position: relative; padding: 20px 40px; font-size: 18px; font-weight: bold; color: #fff; background: linear-gradient(90deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #8b00ff); background-size: 400% 400%; border: none; border-radius: 30px; cursor: pointer; outline: none; animation: gradient 5s ease infinite; transition: all 0.3s ease; } .rainbow-button:hover { animation: gradient 2s ease infinite; } @keyframes gradient { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } } .rainbow-button span { position: relative; z-index: 1; } </style> </head> <body> <button type="button" class="rainbow-button"> <span>Rainbow Effect</span> </button> </body> </html>