We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
记录一下CSS盒模型
从计算上看,border-box更符合人的直觉,比如实际生活中的纸盒子.
如果由第三方库不兼容box-sizing: border-box,则可以如下设置
: root { box-sizing: border-box; } *, ::before, ::after { box-sizing: inherit; } // 这样的话不会破坏第三方组件可能改变的box-sizing // 可以在必要时选中第三方组件的顶级容器,将其恢复为 content-box .third-party-component { box-sizing: content-box; }
CSS in Depth
The text was updated successfully, but these errors were encountered:
No branches or pull requests
记录一下CSS盒模型
盒模型
content-box:W3C 标准盒模型
border-box: IE 盒模型
从计算上看,border-box更符合人的直觉,比如实际生活中的纸盒子.
项目中设置盒模型
如果由第三方库不兼容box-sizing: border-box,则可以如下设置
The text was updated successfully, but these errors were encountered: