Skip to content

Instantly share code, notes, and snippets.

@DeviaVir
Created September 5, 2012 20:55
Show Gist options
  • Save DeviaVir/3644596 to your computer and use it in GitHub Desktop.
Save DeviaVir/3644596 to your computer and use it in GitHub Desktop.
3d transform padding
/**
* 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 );
}
<!-- content to be placed inside <body>…</body> -->
<div class="container">
<div class="padding"></div>
</div>
{"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