Skip to content

Instantly share code, notes, and snippets.

@justmarkup
Created February 9, 2013 13:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save justmarkup/4745265 to your computer and use it in GitHub Desktop.
Save justmarkup/4745265 to your computer and use it in GitHub Desktop.
/**
* Webplatform example for http://docs.webplatform.org/wiki/css/properties/transform
* transform: translate(80px, 80px) scale(1.5, 1.5) rotate(45deg);
*/
html {padding: 2em}
.step {
width: 10em;
height: 10em;
padding: 0.2em;
position: absolute;
background: #eee;
border: 1px solid grey;
font-family: Arial;
}
.step1 {
transform: translate(80px, 80px);
background: rgba(248,156,,0.4);
}
.step2 {
transform: translate(80px, 80px) scale(1.5, 1.5);
background: rgba(0,0,0,0.4);
}
.step3 {
transform: translate(80px, 80px) scale(1.5, 1.5) rotate(45deg);
background: rgba(0,0,0,0.4);
}
<div class="step"></div>
<div class="step step1">translate</div>
<div class="step step2">scale</div>
<div class="step step3">rotate</div>
// alert('Hello world!');
{"view":"split-vertical","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