Created
July 11, 2018 03:30
-
-
Save Yang03/db012a7d1c56b2205b28d59748c8a597 to your computer and use it in GitHub Desktop.
box
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-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; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
content = 200
box(240) = 200(content) + padding(20) + border(20)
box(200) = content(160) + padding(20) + border(20)