.wrapper > div:,
.wrapper > p:nth-of-type(2n){
background: orange;
}
/*或者*/
.wrapper > div:,
.wrapper > p:nth-of-type(2n){
background: orange;
}
/*或者*/
.wrapper > div:,
.wrapper > p:nth-of-type(even){
background: orange;
}
😣
而且,即使在div后面补充好了nth-of-type,仍然会被判断成在全部元素里计算奇数的div并为之赋予背景颜色