批改状态:合格
老师批语:
.list > li:nth-of-type(1) {background-color: violet;}
.list>li:first-of-type {background-color: green;}
.list > li:nth-of-type(8) {background-color: violet;}
.list>li:last-of-type {background-color: yellow;}
.list>li:nth-last-of-type(4) {background-color: red;}
层级:>,空格
平级:+,~
.list> :nth-of-type(n+3) {background-color: green;}
计算过程:
.list> :nth-of-type(-n+3) {background-color: green;}
计算过程:
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号