HTML සහ CSS යොදාගෙන Animated Button එකක් සාදාගන්නා ආකාරය
<!DOCTYPE html> <html> <head> <title>Animation Button 1</title> <style> body{ margin-top: 20%; margin-left: 50%; } .btn { text-transform: capitalize; background:#0066ff; color: #fff; cursor: pointer; display: inline-block; font-size: 18px; font-weight: 400; letter-spacing: 1px; line-height: 0; margin-bottom: 0; padding: 27px 44px; border-radius: 25px; margin: 10px; cursor: pointer; transition: color 0.4s linear; position: relative; z-index: 1; border: 0; overflow: hidden; margin: 0; text-decoration: none; } .btn::before { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 100%; background:#0099cc; z-index: 1; border-radius: 5px; transition: transform 0.5s; transition-timing-function: ease; transform-origin: 0 0; transition-timing-function: cubic-bezier(0.5, 1.6, 0.4, 0.7); transform: scaleX(0); } .btn:hover::before { transform: scaleX(1); color:#fff !important; z-index: -1; } .header-btn { padding: 25px 28px !important; } @media (min-width: 1200px) and (max-width: 1400px) { .header-btn { padding: 25px 21px !important; } } </style> </head> <body> <a href="#" class=" btn header-btn">Sign Up</a> </body> </html>
2