使用CSS实现table隔行变色

来源:互联网 发布:c语言中文网vip分享 编辑:程序博客网 时间:2024/05/27 14:14

方法一:

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

方法二:

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