84669 personnes étudient
152542 personnes étudient
20005 personnes étudient
5487 personnes étudient
7821 personnes étudient
359900 personnes étudient
3350 personnes étudient
180660 personnes étudient
48569 personnes étudient
18603 personnes étudient
40936 personnes étudient
1549 personnes étudient
1183 personnes étudient
32909 personnes étudient
项目要兼容IE8,其中用了大量的半透明效果,现在要求给表格的每相隔一行的TD添加一个深背景以区分,所以不能写死,请问怎么实现
走同样的路,发现不同的人生
不知道你的意思是不是需要下图的效果
如果是的话,我的做法是:(引用了jQuery,兼容IE8)
//表格隔行显示不同背景色 $("table tr:not(:first-child):nth-child(2n+1)").css("background", "#D7E4F5");
说的是奇偶选择器么
dt:nth-child(odd){ background-color: red } dt:nth-child(even){ background-color: #e1e1e1 }
ie8有点难办了,如果是几个表格还能用:first-child+li+li{}这样的笨方法,大量的话又不想引用selectivizr.js这样大的组件。1:在js插入数据时动态添加类名,2:后端传入数据时带入类名标识。
:first-child+li+li{}
不知道你的意思是不是需要下图的效果
如果是的话,我的做法是:(引用了jQuery,兼容IE8)
说的是奇偶选择器么
ie8有点难办了,如果是几个表格还能用
:first-child+li+li{}
这样的笨方法,大量的话又不想引用selectivizr.js这样大的组件。1:在js插入数据时动态添加类名,2:后端传入数据时带入类名标识。