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
第69天 请说说*{box-sizing: border-box;}的作用及好处有哪些?
*{box-sizing: border-box;}
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
还是喜欢用默认的content-box 不考虑老版ie 比较通配符的性能较差 第三方的UI库的盒模型也都是标准盒模型
很多网站和样式都是 boder-box , 包括淘宝h5版本5和饿了么。 boder-box 对元素设定固定尺寸之后js获取到的值是固定的。
boder-box
作用: 将padding和border包括在width内 好处: 更符合我们通常对一个「盒子」尺寸的认知,省掉一些计算
这样不管border和padding的值是多少,盒子在页面中的占地大小不会发生改变
No branches or pull requests
第69天 请说说
*{box-sizing: border-box;}
的作用及好处有哪些?The text was updated successfully, but these errors were encountered: