:root
根元素,他始终是html
元素:not(x)
否定伪类选择器。x
是一个选择器,not()
可以看出一个否定元素,最终的结果不满足x
的被选中/*选中id不是abc的div*/ div:not(#abc){ background-color: green; }
:empty
没有子元素的被选中。:nth-child(n)
第n
个子元素:nth-last-child(n)
从后向前计算的第n
个子元素:nth-of-type(n)
第n
个子元素:nth-last-of-type(n)
从后向前计算的第n
个子元素