table

1 style{
2     table tr:nth child(odd){
3         background:red;
4         }/*基数行背景红*/
5     table tr:nth child(even){
6         background:blue;
7         }/*偶数行背景蓝*/
8     }
9  
原文地址:https://www.cnblogs.com/Ajay-blog/p/6703298.html