Created
February 19, 2012 21:29
-
-
Save WebInspectInc/1865891 to your computer and use it in GitHub Desktop.
Page flipper
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
/** | |
* Page flipper | |
*/ | |
* { | |
box-sizing:border-box; | |
} | |
.pages { | |
position:relative; | |
width:30%; height:250px; | |
} | |
.pages > div { | |
transition:all 1s linear; | |
position:absolute; | |
right:0; | |
padding:30px; | |
background:#C0C0F0; | |
width:50%;height:100%; | |
} | |
.pages > .cover { | |
z-index:100; | |
background:#C0F0C0; | |
font-size:3em;text-align:center; | |
} | |
.pages > .page:nth-child(2) { | |
z-index:110; | |
background:grey; | |
transform:rotate(-20deg) translateX(100%); | |
transform-origin:center right; | |
} | |
.pages:hover > .cover { | |
margin-right:50%; | |
} | |
.pages:hover > .page:nth-child(2) { | |
transform: rotate(0) translateX(-100%); | |
} |
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
<div class="pages"> | |
<div class="cover">Menu</div> | |
<div class="page">Blaa</div> | |
<div class="page">Tlaa</div> | |
</div> |
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
{"view":"split","prefixfree":"1","page":"css"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment