0
点赞
收藏
分享

微信扫一扫

Angular JS伪类选择器(奇偶行样式)

Villagers 2023-04-17 阅读 69


table tr:nth-child(odd)	{
  background-color: #f1f1f1;
}
table tr:nth-child(even) {
  background-color: #ffffff;
}

如上,:nth-child(odd)匹配序列号为奇数的元素,:nth-child(even)匹配序列号为偶数的元素。

举报

相关推荐

0 条评论