Created
September 5, 2012 20:55
-
-
Save DeviaVir/3644596 to your computer and use it in GitHub Desktop.
3d transform padding
This file contains hidden or 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
/** | |
* 3d transform padding | |
*/ | |
.container { | |
border: 1px solid rgba( 0, 0, 0, 0.5 ); | |
} | |
.padding { | |
height: 100px; | |
width: 50px; | |
margin: 0 auto; | |
border: 1px solid red; | |
/* Fix the fake padding */ | |
position: absolute; | |
/* Hide it */ | |
-webkit-transform: scale3d( 0, 0, 0 ); | |
} |
This file contains hidden or 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="container"> | |
<div class="padding"></div> | |
</div> |
This file contains hidden or 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
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"css"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment