Created
December 5, 2012 12:50
-
-
Save dziudek/4215261 to your computer and use it in GitHub Desktop.
Image Roll
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
/** | |
* Image Roll | |
*/ | |
#image-roll { | |
height: 200px; | |
width: 600px; | |
perspective: 600; | |
} | |
#image-roll > div { | |
float: left; | |
height: 300px; | |
opacity: 0; | |
transform: rotateY(-120deg); | |
transform-origin: right 0; | |
transition: transform .3s ease-out; | |
width: 200px; | |
} | |
#image-roll > div.active { | |
opacity: 1; | |
transform: rotateY(0deg); | |
} | |
.image-roll1 { | |
background: transparent url('http://placekitten.com/600/300') 0 0; | |
} | |
.image-roll2 { | |
background: transparent url('http://placekitten.com/600/300') -200px 0; | |
} | |
.image-roll3 { | |
background: transparent url('http://placekitten.com/600/300') -400px 0; | |
} |
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
<!-- content to be placed inside <body>…</body> --> | |
<div id="image-roll"> | |
<div class="image-roll1"></div> | |
<div class="image-roll2"></div> | |
<div class="image-roll3"></div> | |
</div> | |
<hr /> | |
<button id="btn">RUN!</button> |
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":"100","seethrough":"","prefixfree":"1","page":"html"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment