table:.myTable tr:nth-child(even){ //偶数行 background:#fff;}.myTable tr:nth-child(odd){ //奇数行 background:#f5f2eb;}
ul列表:
#Ulist li:nth-of-type(odd){ margin-left: 20px;}奇数行
#Ulist li:nth-of-type(even){margin-left: 10px;}偶数行