美文网首页
CSS优先级提升-important

CSS优先级提升-important

作者: 直到世界尽头_Leo | 来源:发表于2018-04-18 15:42 被阅读0次

    1.什么是important?

    作用:用于提升某个直接选中标签的选择器的某个属性的优先级,可以将优先级提到最高

    注意点:
    1.important只能用于直接选中,不能用于间接选中
    2.通配符选择器选中的标签也是直接选中
    3.!important只会提升被指定的属性的优先级,其他属性不会

    相关文章

      网友评论

          本文标题:CSS优先级提升-important

          本文链接:https://www.haomeiwen.com/subject/fngvkftx.html