Created
August 4, 2010 18:46
-
-
Save dab/508596 to your computer and use it in GitHub Desktop.
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
CSS : | |
#flip { | |
position: absolute; | |
min-height: 460px; | |
width: 320px; | |
-webkit-perspective: 1000; | |
background: #000; | |
} | |
#front, #back { | |
background: #fff; | |
position: absolute; | |
top: 0; | |
width: 100%; | |
min-height: 100%; | |
-webkit-backface-visibility: hidden; | |
-webkit-transform-style: preserve-3d; | |
-webkit-transition: all .5s ease-in-out; | |
} | |
#front { | |
-webkit-transform: rotateY(0deg); | |
} | |
#back { | |
-webkit-transform: rotateY(180deg); | |
} | |
div:target#flip #front { | |
-webkit-transform: rotateY(-180deg); | |
} | |
div:target#flip #back { | |
-webkit-transform: rotateY(0deg); | |
} | |
-- | |
HTML | |
<div id="flip"> | |
<div id="front"> | |
FRONT | |
<p><a href="#flip">Flip to back !</a></p> | |
</div> | |
<div id="back"> | |
BACK | |
<p><a href="#">Flip to front !</a></p> | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment