CSS——nth-child(odd) 和 nth-child(even)
这两个都是css3选择器,odd是奇数行,even是偶数行。
ul li:nth-child(odd){
background-color: lightgreen;
}
以上样式表示奇数行的li背景色为浅绿色。

这两个都是css3选择器,odd是奇数行,even是偶数行。
ul li:nth-child(odd){
background-color: lightgreen;
}
以上样式表示奇数行的li背景色为浅绿色。
