Skip to content

Instantly share code, notes, and snippets.

@lipelip
Created December 4, 2012 13:40
Show Gist options
  • Save lipelip/4203972 to your computer and use it in GitHub Desktop.
Save lipelip/4203972 to your computer and use it in GitHub Desktop.
3D transform: une porte comic
/**
* 3D transform: une porte comic
*/
#container {
width: 250px;
height: 400px;
background: #CCC;
-webkit-perspective: 1000px;
margin: 50px auto;
position:relative;
}
.porte {
width: 250px;
height: 400px;
background: #BADA55;
-webkit-transform-style: preserve-3d;
-webkit-transition: -webkit-transform 1s ease-in;
-webkit-transform-origin: left center;
}
#container:hover .porte {
-webkit-transform: rotateY(-95deg);
-webkit-transition: -webkit-transform 2s ease-out;
}
span {
position: absolute;
bottom: 40px;
width: 100%;
background: #FAFAFA;
color: green;
font-family: helvetica, sans-serif;
text-align:center;
padding: 20px 0;
-webkit-transform-style: preserve-3d;
}
#container > span {
font-family: "comic sans ms", fantasy;
z-index: -10;
<div id="container">
<div class="porte">
<span>Helvetica</span>
</div><!-- end -->
<span>La Comic de Connard</span>
</div><!-- end -->
// alert('Hello world!');
{"view":"split","fontsize":"70","seethrough":"","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment