结构伪类选择器
结构伪类选择器
first-child
nth-child(n) 里面可以是数字 可以是even(偶数) odd(奇数) 也可以是式子如 -n+5 表示前五个
last-child
用法与上面基本一样 但是 nth-of-type会先去查看前面指定的元素 再去看目标是排在第几个
nth-of-type(
结构伪类选择器
first-child
nth-child(n) 里面可以是数字 可以是even(偶数) odd(奇数) 也可以是式子如 -n+5 表示前五个
last-child
用法与上面基本一样 但是 nth-of-type会先去查看前面指定的元素 再去看目标是排在第几个
nth-of-type(