<style>
/*奇数*/
ul li:nth-child(odd){
background-color: green;
}
/*偶数*/
ul li:nth-child(even){
background-color: red;
}
</style>
<style>
/*奇数*/
ul li:nth-child(odd){
background-color: green;
}
/*偶数*/
ul li:nth-child(even){
background-color: red;
}
</style>
本文标题:css3奇数偶数的伪属性
本文链接:https://www.haomeiwen.com/subject/oodeyqtx.html
网友评论