纯css 设置隔行样式

时间:2021-07-19 22:54:16   收藏:0   阅读:42

奇数行:

.messageitem:nth-child(even){
  color: #c18e14;
}

偶数行:

.messageitem:nth-child(odd){
  color: #84c084;
}

 

原文:https://www.cnblogs.com/luo1240465012/p/15031261.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!