什么时候CSS的!重要的声明不行?

我想知道有人可以提供一些权威性的参考摘要,当CSS中的重要声明不能覆盖内联样式时。

解决方法

确定哪些风格相互重叠有很多因素。级联中出现的较低的风格声明,以及针对元素的具体情况越多,与其他样式相比越重。

这是风格继承的CSS2 standard

  1. If the cascade results in a value,use it.
  2. Otherwise,if the property is inherited,use the value of the parent
    element,generally the computed value.
  3. Otherwise use the property’s initial value. The initial value of
    each property is indicated in the
    property’s deFinition.

内部浏览器将按照calculate the specificity of a rule标准。重要的声明将增加规则的权重,但动态分配样式属性通常会优先,因为它通常是高度指定的。

相关文章

Css3如何实现鼠标移上变长特效?(图文+视频)
css3怎么实现鼠标悬停图片时缓慢变大效果?(图文+视频)
jquery如何实现点击网页回到顶部效果?(图文+视频)
css3边框阴影效果怎么做?(图文+视频)
css怎么实现圆角边框和圆形效果?(图文+视频教程)
Css3如何实现旋转移动动画特效