nth-of-type(n)

:nth-of-type(n) 选择器匹配属于父元素的特定类型的第 N 个子元素的每个元素。

p:nth-of-type(2)
{
  background:#ff0000;
}

规定属于其父元素的第二个 p 元素的每个 元素

原文地址:https://www.cnblogs.com/wanlibingfeng/p/9269361.html