Skip to content

Instantly share code, notes, and snippets.

@Yang03
Created July 11, 2018 03:30
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 Yang03/db012a7d1c56b2205b28d59748c8a597 to your computer and use it in GitHub Desktop.
Save Yang03/db012a7d1c56b2205b28d59748c8a597 to your computer and use it in GitHub Desktop.
box
.content-box {
width:200px;
height: 200px;
box-sizing: content-box;
padding: 10px;
border: 10px solid #f46;
margin: 10px;
}
.border-box {
width:200px;
height: 200px;
box-sizing: border-box;
padding: 10px;
border: 10px solid #f46;
margin: 10px;
}
@Yang03
Copy link
Author

Yang03 commented Jul 11, 2018

image
image
content = 200
box(240) = 200(content) + padding(20) + border(20)
image
image
box(200) = content(160) + padding(20) + border(20)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment