Skip to content

Instantly share code, notes, and snippets.

@maurostorch
Created May 21, 2016 12:16
Show Gist options
  • Save maurostorch/de4d131b1f8cae90799685b9f45ca04d to your computer and use it in GitHub Desktop.
Save maurostorch/de4d131b1f8cae90799685b9f45ca04d to your computer and use it in GitHub Desktop.
Icon envelope
<!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>
@maurostorch
Copy link
Author

envelope

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment