Glowing Gradient Button
HTML CODE:-
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title></title> </head> <body> <a href="#" class="btn">Saksham</a> </body> </html> |
CSS CODE:-
body{ padding: 0px; margin: 0px; display: flex; align-items: center; justify-content: center; min-height: 100vh; background-color: black; } .btn{ position: relative; display: inline-block; width: 150px; height: 50px; text-align: center; line-height: 50px; color: white; font-size: 22px; text-decoration: none; background: linear-gradient(90deg, #03a9f4, #f441a5, #ffeb3b, #03a9f4); background-size: 400%; border-radius: 30px; z-index: 1; } .btn:hover{ animation: animate 8s linear infinite; box-shadow: 0 0 40px #f441a5; } @keyframes animate{ 0%{ background-position: 0%; } 100%{ background-position: 400%; } } |