:is :not :has :where 选择器优先级

  1. id
  2. class :require :nth-of-type :root :hover :focus ... [type=text]
  3. p ::before ::placeholder 两个字符 ::
  4. :where +, >, ~, " ", and ||
  5. :is() :not() :has() 已括号里最大的为准
    特殊性
    image
    练习
    image

https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity#how_is_specificity_calculated

posted @ 2024-02-21 11:55  躺尸的大笨鸟  阅读(5)  评论(0编辑  收藏  举报