Created
August 17, 2012 15:43
-
-
Save juice49/3380012 to your computer and use it in GitHub Desktop.
Untitled
This file contains 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
@keyframes peel-open { | |
0% { | |
width:150px; | |
height:150px; | |
} | |
100% { | |
width:300px; | |
height:300px; | |
} | |
} | |
@keyframes peel-close { | |
0% { | |
width:300px; | |
height:300px; | |
} | |
100% { | |
width:150px; | |
height:150px; | |
} | |
} | |
html, | |
body { | |
width:100%; | |
height:100%; | |
margin:0; | |
padding:0; | |
} | |
.peel-away { | |
position:absolute; | |
top:0; | |
right:0; | |
width:150px; | |
height:150px; | |
overflow:hidden; | |
background:#fff; | |
box-shadow:100px -60px 100px 30px rgba(0,0,0,0.8); | |
} | |
.peel-away:hover { | |
animation:peel-open 1s; | |
} | |
.peel-away:not(:hover) { | |
animation:peel-close 1s; | |
} | |
.peel-away:after { | |
display:block; | |
position:absolute; | |
bottom:0; | |
left:0; | |
width:100%; | |
height:100%; | |
background:#394247; | |
background:linear-gradient(45deg, #394247, #51626B 45%, #394247 50%, transparent 50%); | |
content:''; | |
} | |
.peel-away .inner { | |
position:absolute; | |
width:300px; | |
height:300px; | |
top:0; | |
right:0; | |
} | |
.content { | |
width:100%; | |
height:100%; | |
background:#4B5358; | |
} |
This file contains 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="peel-away"> | |
<div class="inner"> | |
<img src="http://lorempixum.com/300/300" /> | |
</div> | |
</div> | |
<div class="content"> | |
</div> |
This file contains 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
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment