Skip to content

Instantly share code, notes, and snippets.

@voidove
Last active August 29, 2015 14:16
Show Gist options
  • Save voidove/56ac31df3bea3b6f459a to your computer and use it in GitHub Desktop.
Save voidove/56ac31df3bea3b6f459a to your computer and use it in GitHub Desktop.
box-sizing
/**
* box-sizing
*/
.test1 {
width: 500px;
margin: 20px auto;
box-sizing: border-box;
border:10px solid red;
}
.test2 {
width: 500px;
margin: 20px auto;
box-sizing: border-box;
padding: 50px;
border: solid blue 10px;
}
.test3 {
width: 500px;
margin: 20px auto;
box-sizing: content-box;
padding: 50px;
border: solid blue 10px;
}
<div class="test1">hello</div>
<div class="test2">hi</div>
<div class="test3">world</div>
// alert('Hello world!');
{"view":"separate","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