Skip to content

Instantly share code, notes, and snippets.

@zincplusplus
Created July 30, 2013 15:41
Show Gist options
  • Save zincplusplus/6114105 to your computer and use it in GitHub Desktop.
Save zincplusplus/6114105 to your computer and use it in GitHub Desktop.
Rotate a red block
/* Rotate a red block */
body {margin: 100px; padding:0}
.parent {
width: 200px;
height: 200px;
background: yellow;
}
.rotateMe {
width: 100%;
height: 100%;
background: red;
-webkit-transform:rotate(25deg);
-moz-transform:rotate(25deg);
transform:rotate(25deg);
-webkit-transform-origin: 50% 100%;
-moz-transform-origin: 50% 100%;
transform-origin: 50% 100%;
}
<div class="parent">
<div class="rotateMe"></div>
</div>
// 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