概念

伪类

  1. CSS1
    • :link
    • :visited
    • :active
  2. CSS2
    • :lang()
    • :first-child
    • :hover
    • :focus
  3. CSS3
    • :target
    • :root
    • :nth-child()
    • :nth-last-of-child()
    • :nth-of-type()
    • :nth-last-of-type()
    • :last-child
    • :first-of-type
    • :last-of-type
    • :only-child
    • :only-of-type
    • :empty
    • :not()

伪元素