当前位置: 首页 - 编程技术 - 文章正文

table 隔行变色

xiaoqihv
1 /*从第二行(偶数行)开始变色*/2 table tr:nth-child(2n){3 background-color:red;4 }5 6 /*从第一行(奇数行)开始变色*/7 table tr:nth-child(2n-1){8 background-color:red;9 }

 

转载于:https://www.cnblogs.com/1301694f/p/9044421.html

文章地址:https://wenmayi.cn/post/4840.html