Created
December 12, 2011 04:18
-
-
Save oli/1464828 to your computer and use it in GitHub Desktop.
matrix() units for variables e & f
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* matrix() units for variables e & f */ | |
body {font-size: 10px;} | |
div { | |
width: 100px; | |
height: 100px; | |
border: 1px solid black; | |
line-height: 180px; | |
text-align: center; | |
} | |
span {font-size: 20px;} | |
.unitless {transform: matrix(1,0,0,1,50,-50);} | |
.px {transform: matrix(1,0,0,1,50px,-50px);} | |
.percent {transform: matrix(1,0,0,1,50%,-50%);} | |
.em {transform: matrix(1,0,0,1,5em,-5em);} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- content to be placed inside <body>…</body> --> | |
<div class="unitless"><span>unitless</span></div> | |
<div class="px"><span>px</span></div> | |
<div class="percent"><span>percent</span></div> | |
<div class="em"><span>em</span></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"page":"html","view":"split-vertical"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment