我想知道有人可以提供一些权威性的参考摘要,当CSS中的重要声明不能覆盖内联样式时。
解决方法
确定哪些风格相互重叠有很多因素。级联中出现的较低的风格声明,以及针对元素的具体情况越多,与其他样式相比越重。
这是风格继承的CSS2 standard:
内部浏览器将按照calculate the specificity of a rule标准。重要的声明将增加规则的权重,但动态分配样式属性通常会优先,因为它通常是高度指定的。
这是风格继承的CSS2 standard:
内部浏览器将按照calculate the specificity of a rule标准。重要的声明将增加规则的权重,但动态分配样式属性通常会优先,因为它通常是高度指定的。