:nth-of-type(n) 与 :nth-child(n) 区别

  • :nth-of-type(n):选择器匹配同类型中的第n个同级兄弟元素。
  • :nth-child(n):选择器匹配父元素中的第n个子元素。
原文地址:https://www.cnblogs.com/cag2050/p/8616031.html