Skip to content

Instantly share code, notes, and snippets.

@Calvetto
Last active November 30, 2015 09:15
Show Gist options
  • Select an option

  • Save Calvetto/abedd1d0e0bd2d8741cb to your computer and use it in GitHub Desktop.

Select an option

Save Calvetto/abedd1d0e0bd2d8741cb to your computer and use it in GitHub Desktop.
Perspectiva
/*
* Perspectiva
*/
.container {
width: 200px; height: 200px;
border: 1px solid #CCC;
margin: 40px 50px;
position: relative;
perspective: 600px;
}
.box {
width: 100%; height: 100%;
display: block;
position: absolute;
}
.box.red {
transform: rotate( 45deg );
background-color: red;
}
.box.blue {
transform: rotateY( -45deg );
background-color: blue;
}
<section id="red" class="container">
<div class="box red"></div>
</section>
<section id="blue" class="container">
<div class="box blue"></div>
</section>
// alert('Hello world!');
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment