Skip to content

Instantly share code, notes, and snippets.

@fredericobenevides
Last active April 1, 2016 17:40
Show Gist options
  • Save fredericobenevides/c3a9602171edec14c49c150aabce6ea9 to your computer and use it in GitHub Desktop.
Save fredericobenevides/c3a9602171edec14c49c150aabce6ea9 to your computer and use it in GitHub Desktop.
Teste cubo
.cubo {
transform-style: preserve-3d;
position: relative;
top: 100px;
left: 100px;
transform: rotateX(10deg) rotateY(10deg);
}
.face {
position: absolute;
width: 100px;
height: 100px;
display: block;
top: 0;
left: 0;
}
.frente {
background-color: red;
transform: translateZ(50px);
}
.direita {
background-color: blue;
transform: translateX(50px) roateY(90deg);
}
.esquerda {
background-color: green;
transform: translateX(-50px) rotateY(-90deg);
}
.cima {
background-color: black;
transform: translateY(50px) rotateX(90deg);
}
.baixo {
background-color: yellow;
transform: translateY(50px) rotateX(-90deg);
}
.tras {
background-color: grey;
transform: translateZ(-50px) rotateY(180deg);
}
<div class="cubo">
<div class="face frente"></div>
<div class="face direita"></div>
<div class="face esquerda"></div>
<div class="face cima"></div>
<div class="face baixo"></div>
<div class="face tras"></div>
</div>
{"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