跳到主要内容

选择器和优先级

优先级递减为

  1. !important
  2. 内联样式
  3. ID 选择器(#example
  4. 类选择器(.example), 属性选择器([type="radio"]), 伪类(:hover
  5. 标签名选择器(h1), 伪元素(::before