Skip to content

Instantly share code, notes, and snippets.

@lipelip
Created December 4, 2012 13:34
Show Gist options
  • Select an option

  • Save lipelip/4203917 to your computer and use it in GitHub Desktop.

Select an option

Save lipelip/4203917 to your computer and use it in GitHub Desktop.
3D transform: une porte
/**
* 3D transform: une porte
*/
#container {
width: 250px;
height: 400px;
background: #CCC;
-webkit-perspective: 1000px;
margin: 50px auto;
}
.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;
}
<div id="container">
<div class="porte"></div><!-- end -->
</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