Created
April 20, 2013 22:04
-
-
Save anonymous/5427600 to your computer and use it in GitHub Desktop.
created by http://livecoding.io
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
{ | |
"libraries": [ | |
"Rickshaw" | |
], | |
"mode": "css", | |
"layout": "fullscreen mode (vertical)", | |
"resolution": "reset" | |
} |
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
.card { | |
text-align: center; | |
-webkit-transform-style: preserve-3d; | |
width: 90px; | |
height: 90px; | |
padding: 10px; | |
position: absolute; | |
-webkit-transform: rotateY( 50deg ); | |
left: calc(50% - 45px); | |
top: calc(50% - 45px); | |
} | |
.front { | |
position: absolute; | |
width: 90px; | |
height: 90px; | |
background: #aaa; | |
padding: 10px; | |
-webkit-backface-visibility: hidden; | |
} | |
.back { | |
position: absolute; | |
width: 90px; | |
height: 90px; | |
background: #aaa; | |
padding: 10px; | |
-webkit-backface-visibility: hidden; | |
-webkit-transform: rotateY( 180deg ); | |
} | |
.scene { | |
position: absolute; | |
left: 0; | |
right: 0; | |
top: 0; | |
bottom: 0; | |
-webkit-perspective: 800px; | |
-webkit-perspective-origin: 50% 50%; | |
} |
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 class="scene"> | |
<div class="card" id="c"> | |
<div class="front">I'm a fancy 3d card</div> | |
<div class="back">Other side</div> | |
</div> | |
</div> |
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
var c = document.getElementById("c"); | |
var r = 0; | |
setInterval(function() { | |
r += 10; | |
c.style.webkitTransform = "rotateY(" + r + "deg)"; | |
}, 20); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment