【前端基础】16、结构伪类(注:粗略说明)

一、结构伪类:nth-child()

例1:

例2:

二、结构伪类:nth-last-child()

三、结构伪类:nth-of-type()

:nth-child()的弊端:

:nth-of-type()的作用:

四、其他结构伪类

  • :first-child
  • :only-child
  • :only-of-type

五、否定伪类:not()