table隔行变色

/*table隔行变色*/
    #customers tr {
        background:#ffffff;
    }

        #customers tr:nth-child(2n+1) {
            background: #A7C942;
        }

    #customers tr {
        background-color: expression((this.sectionRowIndex%2==0)?#f00:#A7C942);
    }

#customers  获取table的id

原文地址:https://www.cnblogs.com/sll-fuling/p/5390952.html