Created
September 11, 2012 12:37
-
-
Save vennsoh/3698107 to your computer and use it in GitHub Desktop.
Folding card 2
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
/** Folding card 2*/ | |
.view { | |
width: 340px; | |
height: 200px; | |
background: black; | |
perspective: 800px; | |
} | |
.slice { | |
width: 60px; | |
height: 100%; | |
transform-style: preserve-3d; | |
transform-origin: left center; | |
transition: transform 150ms ease-in-out; | |
} | |
.s2, .s3, .s4, .s5 { | |
transform: translate3d(60px, 0, 0); | |
} | |
.overlay { | |
width: 60px; | |
height: 100%; | |
opacity: 0; | |
position: absolute; | |
transition: opacity 150ms ease-in-out; | |
} | |
.view:hover .overlay { | |
opacity: 1; | |
} | |
.view:hover .s1 { | |
transition-delay: 200ms; | |
transform: rotate3d(0,1,0,-3deg); | |
} | |
.view:hover .s2{ | |
transition-delay: 150ms; | |
transform: translate3d(59px,0,0) rotate3d(0,1,0,-10deg); | |
} | |
.view:hover .s3{ | |
transition-delay: 100ms; | |
transform: translate3d(59px,0,0) rotate3d(0,1,0,-16deg); | |
} | |
.view:hover .s4 { | |
transition-delay: 50ms; | |
transform: translate3d(59px,0,0) rotate3d(0,1,0,-30deg); | |
} | |
.view:hover .s5 { | |
transform: translate3d(60px,0,0) rotate3d(0,1,0,-42deg); | |
} | |
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="view"> | |
<div class="slice s1" style="background-color: #111;"><span class="overlay"></span> | |
<div class="slice s2" style="background-color: #222"><span class="overlay"></span> | |
<div class="slice s3" style="background-color: #333;"><span class="overlay"></span> | |
<div class="slice s4" style="background-color: #444;"><span class="overlay"></span> | |
<div class="slice s5" style="background-color: #555;"><span class="overlay"></span> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</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-vertical","fontsize":"80","seethrough":"","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment