cool button
by Vince Richter
HTML
<html>
<head>
<title>button hover effect</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<a href="#">
<span></span>
<span></span>
<span></span>
<span></span>
button
</a>
</body>
</html>
CSS
body {
margin: 0;
padding: 0;
}
a {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 180px;
height: 60px;
line-height: 60px;
text-align: center;
color: #000;
text-decoration: none;
text-transform: uppercase;
font-size: 24px;
letter-spacing: 2px;
font-family: sans-serif;
transition: .5s;
}
a.before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: #000;
z-index: -1;
transform: scale(0);
transition: .5s;
}
a.hover.before
{
transform: scale(0);
}