Skip to content

Instantly share code, notes, and snippets.

@romeoh
Created September 26, 2012 01:04
Show Gist options
  • Save romeoh/3785383 to your computer and use it in GitHub Desktop.
Save romeoh/3785383 to your computer and use it in GitHub Desktop.
3d
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<style type="text/css">
.view {
background:#eee;; width:400px; height:300px;
-webkit-perspective: 500px
}
.view .sp1 {
width:50px; height:300px; z-index:90;
background:#999;
-webkit-transform-style: preserve-3d;
-webkit-transform: rotateY(0deg)
}
.view .sp2Box {
-webkit-transform-style: preserve-3d;
-webkit-transform: rotateY(0deg) translate3d(50px,0,0);
}
.view .sp2 {
width:50px; height:300px; z-index:100;position:absolute;
background:#666;
-webkit-transform-origin: left center;
-webkit-transform-style: preserve-3d;
-webkit-transform: rotateY(-50deg) translate3d(0px,0,0);
}
</style>
<script>
</script>
</head>
<body>
<div class="view">
<div class="sp1">
<div class="sp2Box">
<div class="sp2">
</div>
</div>
</div>
</div>
<script>
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment