Awesome Button Hover Effect code:
1.index.html:
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Button Hover Effect</title> <link rel="stylesheet" href="style.css"> </head> <body> <a href="#"> <div class="front">Button</div> <div class="back">Button</div> </a> </body> </html>
2.style.css:
body { margin: 0; padding: 0; } a { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 180px; height: 60px; text-align: center; line-height: 60px; font-family: Verdana, Geneva, Tahoma, sans-serif; color: black; text-transform: uppercase; text-decoration: none; letter-spacing: 6px; border: 2px solid black; font-size: 24px; transition: 0.5s; overflow: hidden; } a .fornt { width: 100%; height: 100%; position: absolute; top: 0; left: 0; transform: scale(1); transition: 0.8s; background: black; color: white; opacity: 0; } a .back { width: 100%; height: 100%; position: absolute; top: 0; left: 0; transform: scale(5); transition: 0.8s; background: black; color: white; opacity: 0; } a:hover .front { transform: scale(0); } a:hover .back { transform: scale(1); opacity: 1; }