标签:
表格中的隔行变色,很常见
1.css3实现:pc端现在支持的不多
table li:nth-of-type(odd){background:#FAFAFA;}/*奇数行*/ table li:nth-of-type(even){background:#FAFAFA;}/*偶数行*/
2.jquery 实现 :兼容大部分的浏览器
$("tr:odd").css("background-color","#FAFAFA");
$("tr:even").css("background-color","#FAFAFA");
标签:
原文地址:http://www.cnblogs.com/duhuo/p/5404346.html