nth-child和nth-of-type

    0

nth-of-type

image-20201225162545220

nth-child

image-20201225162613256

nth-child

image-20201225162659309

nth-of-type

image-20201225162714731

使用odd测试

  • image-20201225163133338
  • image-20201225163051823
  • image-20201225163031909

nth-of-type 在同类标签中找,nth-child在所有标签中找正好位置是那个的那个元素 否则就无效

#讨论区
00条评论
实时对话
loading...