Saw some button where you hover over them and they get kinda painted (http://www.legworkstudio.com/). This isn't quite that, but easier.
A Pen by Chris Coyier on CodePen.
<a href="#0" class="button"><span>Button</span></a> | |
<a href="#0" class="button"><span>Button</span></a> | |
<a href="#0" class="button"><span>Button</span></a> | |
<a href="#0" class="button"><span>Button</span></a> | |
<a href="#0" class="button"><span>Button</span></a> |
@import "compass"; | |
body { | |
text-align: center; | |
background: #444; | |
padding: 1rem; | |
} | |
.button { | |
background: yellow; | |
display: inline-block; | |
padding: 2rem 4rem; | |
margin: 1rem; | |
text-decoration: none; | |
font: bold 1rem Sans-Serif; | |
color: black; | |
position: relative; | |
overflow: hidden; | |
@include transition(0.7s); | |
&:before { | |
content: ""; | |
position: absolute; | |
bottom: -40px; | |
right: -40px; | |
width: 10px; | |
height: 10px; | |
background: #222; | |
border-radius: 50%; | |
@include transition(0.7s); | |
} | |
span { | |
position: relative; | |
} | |
&:hover, &:focus { | |
color: white; | |
&:before { | |
width: 270px; | |
height: 270px; | |
opacity: 1; | |
} | |
} | |
} | |
.button:nth-child(1) { | |
background: #9b59b6; | |
} | |
.button:nth-child(2) { | |
background: #3498db; | |
&:before { | |
bottom: auto; | |
top: -40px; | |
} | |
} | |
.button:nth-child(3) { | |
background: #e74c3c; | |
&:before { | |
right: auto; | |
left: -40px; | |
} | |
} | |
.button:nth-child(4) { | |
background: #f1c40f; | |
&:before { | |
right: auto; | |
bottom: auto; | |
left: -40px; | |
top: -40px; | |
} | |
} | |
.button:nth-child(5) { | |
background: #1abc9c; | |
&:before { | |
right: auto; | |
bottom: auto; | |
left: 90px; | |
top: -40px; | |
} | |
&:hover, &:focus { | |
&:before { | |
left: -50px; | |
} | |
} | |
} |