使用CSS实现table隔行变色

方法一:

tr:nth-child(odd){background:#F4F4F4;}

方法二:

tr {background-color:expression((this.sectionRowIndex%2==0)?"red":"blue")}

猜你喜欢

转载自blog.csdn.net/weixin_42476601/article/details/81905797