Skip to content

Instantly share code, notes, and snippets.

@WebInspectInc
Created February 2, 2012 19:24
Show Gist options
  • Save WebInspectInc/1725234 to your computer and use it in GitHub Desktop.
Save WebInspectInc/1725234 to your computer and use it in GitHub Desktop.
3D Transforms Tests
/**
* 3D Transforms Tests
*/
div, div:before {
color:white;
position:absolute;
width:500px;height:200px;
background:rgba(31, 111, 155,1);
transition:all 2s linear;
perspective:200px;
z-index:1;
}
input[type="radio"]:checked + div {
transform-origin:50% 50% 30%;
transform:rotateY(180deg);
}
input[type="radio"]:checked + div:before {
transform:translateZ(0px) rotateY(0);
}
div:before {
content:"Ho";
background:rgba(173, 0, 0,1);
transform:translateZ(-12px) rotateY(180deg);
z-index:-1;
}
<!-- content to be placed inside <body>…</body> -->
<input type="radio" name="r-button" checked />
<input type="radio" name="r-button" />
<div>Howdy</div>
{"view":"split","prefixfree":"1","page":"css"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment