Text slides up as you hover over the button and the image grows.
Created
January 29, 2015 22:30
-
-
Save ezos86/a214004140aa3330a1fd to your computer and use it in GitHub Desktop.
Hover Button Effect - Grow and Text Slide
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="button"> | |
<div class="btn-content"> | |
<img src="http://upload.wikimedia.org/wikipedia/commons/thumb/3/35/Tux.svg/2000px-Tux.svg.png" alt="linux" /> | |
<p>Linux</p> | |
</div> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import "compass/css3"; | |
body{ | |
margin-top:20px; | |
margin-left:20px; | |
} | |
.button{ | |
width:175px; | |
height:100px; | |
background-color:#ccc; | |
overflow:hidden; | |
@include transition(all 0.3s); | |
.btn-content{ | |
text-align:center; | |
@include transition(all 0.3s); | |
} | |
img{ | |
width:30%; | |
padding-top:20px; | |
@include transition(all 0.3s); | |
} | |
p{ | |
margin-top:60px; | |
@include transition(all 0.3s); | |
} | |
&:hover{ | |
cursor:pointer; | |
background-color:#ddd; | |
img{ | |
padding-top:5px; | |
width:35%; | |
} | |
p{ | |
margin-top:0px; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment