Created
December 4, 2012 13:40
-
-
Save lipelip/4203972 to your computer and use it in GitHub Desktop.
3D transform: une porte comic
This file contains hidden or 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
/** | |
* 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; | |
This file contains hidden or 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 id="container"> | |
<div class="porte"> | |
<span>Helvetica</span> | |
</div><!-- end --> | |
<span>La Comic de Connard</span> | |
</div><!-- end --> |
This file contains hidden or 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
// alert('Hello world!'); |
This file contains hidden or 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":"70","seethrough":"","prefixfree":"1","page":"css"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment