Skip to content

Instantly share code, notes, and snippets.

@hydrangeas
Created April 2, 2012 07:25
Show Gist options
  • Save hydrangeas/2281382 to your computer and use it in GitHub Desktop.
Save hydrangeas/2281382 to your computer and use it in GitHub Desktop.
2012-04-02
#container{
-webkit-perspective: 200px;
}
#stage{
-webkit-transform-style: preserve-3d;
}
#shape{
-webkit-transform-style: preserve-3d;
}
#panel{
-webkit-transform-style: preserve-3d;
}​
#container{
margin: 100px 0 0 200px;
width : 200px;
height: 200px;
display: block;
border: #ccc 1px solid;
-webkit-perspective: 200px;
}
#stage{
-webkit-transform-style: preserve-3d;
}
#shape{
-webkit-transform-style: preserve-3d;
-webkit-transform: translateZ(100px) rotateY(30deg);
}
#panel{
width : 200px;
height: 200px;
display: block;
background-color: blue;
-webkit-transform-style: preserve-3d;
-webkit-transform: translateZ(-250px);
}​
<div id="container">
<div id="stage">
<div id="shape">
<div id="panel"></div>
</div>
</div>
</div>
(function(window, undefined) {
var panel = window.document.getElementById('panel');
panel.addEventListener('click', function(event) {
console.log('clicked panel');
event.preventDefault;
}, true);
console.log('starting..');
})(window);​
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment