Skip to content

Instantly share code, notes, and snippets.

@etownhooligan
Created March 28, 2014 04:55
Show Gist options
  • Save etownhooligan/9825649 to your computer and use it in GitHub Desktop.
Save etownhooligan/9825649 to your computer and use it in GitHub Desktop.
A Pen by Marcus Burnette.
<p>You know you want to hover over it.</p>
<a href="#">Fancy Button</a>
body {
font-family: sans-serif;
padding: 100px;
text-align: center;
}
a {
display: inline-block;
padding: 1em 2em;
border: 3px solid black;
position: relative;
overflow: hidden;
transition: 0.3s;
text-decoration: none;
color: black;
}
a:after {
content: '';
position: absolute;
top: 0%;
left: 0%;
width: 100%;
height: 100%;
background: black;
transform: rotate(-20deg) scaleX(0) scaleY(3);
z-index: -1;
transition: 0.3s;
opacity: 0;
}
a:hover {
color: white;
}
a:hover:after {
transform: rotate(-20deg) scaleX(1.1) scaleY(3);
opacity: 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment