We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
第103天 说说你对低版本IE的盒子模型的理解
The text was updated successfully, but these errors were encountered:
低版本的IE盒子指的是 content包含padding和border在内的盒子模型 即content宽高=width/height+padding2+border2
可以通过设置box-sizing:border-box来指定使用IE盒子模型
Sorry, something went wrong.
一个CSS盒子由四部分组成,由内到外依次是:content、padding、border、margin。
所谓盒子模型定义的是盒子宽高的计算方法,IE盒子模型的宽高为content、padding、border之和。而W3C盒子的宽高仅为content。从页面布局来说前者实际上更实用一点,这也是后来W3C提供box-sizing属性用于切换盒子模型的原因。
盒子模型:content,padding,border,margin W3C盒子宽高为content的宽高; box-sizing: content-box; IE盒子宽高,content + padding + border; box-sizing: border-box;
box-sizing: content-box;
box-sizing: border-box;
一个CSS盒子由四部分组成,由内到外依次是:content、padding、border、margin。 所谓盒子模型定义的是盒子宽高的计算方法,IE盒子模型的宽高为content、padding、border之和。而W3C盒子的宽高仅为content。从页面布局来说前者实际上更实用一点,这也是后来W3C提供box-sizing属性用于切换盒子模型的原因。
No branches or pull requests
第103天 说说你对低版本IE的盒子模型的理解
The text was updated successfully, but these errors were encountered: