Created
May 21, 2016 12:16
-
-
Save maurostorch/de4d131b1f8cae90799685b9f45ca04d to your computer and use it in GitHub Desktop.
Icon envelope
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title></title> | |
<style media="screen"> | |
.holder { | |
width: 100px; | |
height: 100px; | |
float: left; | |
margin-right: 2px; | |
} | |
.base { | |
width: 100px; | |
height: 50px; | |
box-shadow: 0px -5px 2px gray; | |
position: relative; | |
top: 50px; | |
background-color: white; | |
} | |
.block { | |
position: relative; | |
background-image: url(https://cdn1.iconfinder.com/data/icons/logotypes/32/square-facebook-128.png); | |
background-size: contain; | |
width: 100px; | |
height: 100px; | |
float: left; | |
animation-name: hide; | |
animation-duration: 0.1s; | |
animation-fill-mode: forwards; | |
} | |
.block:hover { | |
animation-name: show; | |
animation-duration: 0.1s; | |
animation-fill-mode: forwards; | |
} | |
@keyframes show { | |
from{top:0px;} | |
to{top:-40px;} | |
} | |
@keyframes hide { | |
from{top:-40px;} | |
to{top:0px;} | |
} | |
</style> | |
</head> | |
<body> | |
<div class=""> | |
<div class="holder"> | |
<div class="block"> | |
</div> | |
<div class="base"> | |
</div> | |
</div> | |
</div> | |
</body> | |
</html> |
Author
maurostorch
commented
May 21, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment