Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

box-sizing #10

Open
AILINGANGEL opened this issue Jun 4, 2019 · 0 comments
Open

box-sizing #10

AILINGANGEL opened this issue Jun 4, 2019 · 0 comments

Comments

@AILINGANGEL
Copy link
Owner

box-sizing有两个值: content-box 和border-box

content-box

一个元素的盒模型的width就是内容的宽度,一个盒子的大小就是由 width + 2 * padding + 2 * border + 2 * margin来决定的

border-box

一个元素的盒模型的width指定的是内容区+padding+border的大小,整个盒子的大小就是width + 2* margin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant