CSS3设置Table奇数行和偶数行样式


table:
.myTable tr:nth-child(even){ //偶数行
background:#fff;
}
.myTable tr:nth-child(odd){ //奇数行
background:#f5f2eb;
}

ul列表:

#Ulist li:nth-of-type(odd){ margin-left: 20px;}奇数行   

#Ulist li:nth-of-type(even){margin-left: 10px;}偶数行   


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM