malong1992

ul li:first-child{ }  第一个
ul li:last-child{ }   最后一个
ul li:nth-child(4){ } 指定第几个,4就是代表第四个
ul li:nth-child(2n+1){background:red;}/*匹配第1、第3、第5、…个li*/
ul li:nth-child(odd){background:red;}   基数
ul li:nth-child(even){background:red;}  偶数

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2021-10-13
  • 2022-03-08
  • 2021-11-16
  • 2021-11-30
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-07-27
  • 2021-11-06
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案