为了账号安全,请及时绑定邮箱和手机立即绑定
.wrapper > div:nth-of-type(2n+1),
.wrapper > p:nth-of-type(2n){
  background: orange;
}
/*或者*/
/*
.wrapper > div:nth-of-type(2n-1),
.wrapper > p:nth-of-type(2n){
  background: orange;
}*/
/*或者*/
/*
.wrapper > div:nth-of-type(odd),
.wrapper > p:nth-of-type(even){
  background: orange;
}*/


正在回答

0 回答

举报

0/150
提交
取消
十天精通CSS3
  • 参与学习       242697    人
  • 解答问题       2623    个

本课程为CSS3入门教程,深刻详解CSS3知识让网页穿上绚丽装备

进入课程
意见反馈 帮助中心 APP下载
官方微信