Skip to content

Instantly share code, notes, and snippets.

@avaly
Created August 21, 2012 17:06
Show Gist options
  • Save avaly/3417355 to your computer and use it in GitHub Desktop.
Save avaly/3417355 to your computer and use it in GitHub Desktop.
Untitled
body {
min-height: 100%;
}
#parent {
position: fixed;
left: 100px;
bottom: 50px;
width: 300px;
height: 350px;
-webkit-perspective: 400px;
-moz-perspective: 400px;
-ms-perspective: 400px;
background: #eee;
border: solid 1px #ccc;
}
#panel {
width: 300px;
height: 350px;
background: #aaf;
-webkit-transform: rotateY(111deg);
-moz-transform: rotateY(111deg);
-ms-transform: rotateY(111deg);
-webkit-transform-origin: 0% 100%;
-moz-transform-origin: 0% 100%;
-ms-transform-origin: 0% 100%;
-webkit-transition: all .5s ease;
-moz-transition: all .5s ease;
-ms-transition: all .5s ease;
}
#parent:hover #panel {
-webkit-transform: rotateY(0);
-moz-transform: rotateY(0);
-ms-transform: rotateY(0);
background: #ffa;
}
<div id="parent">
<div id="panel">
Lorem ipsum et dolor sit amet.
</div>
Hover me ^^^
</div>
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment