要想匹配属于其父元素的第N个子元素,应该选择的选择器是()
A: :nth-last-child(n)
B: :nth-child(n)
C: :first-child
D: :last-child
A: :nth-last-child(n)
B: :nth-child(n)
C: :first-child
D: :last-child
举一反三
- 下列选项中,可以选择父元素中的第n个子元素的选择器有() A: :nth-child(n) B: :only-child C: :first-child D: :nth-last-child(n)
- CSS3中,如果某个父元素仅有一个子元素,则使用()选择器不能选择这个子元素。 A: :nth-child(1) B: :last-child C: :child D: :only-child
- first -child选择器只能获取父级元素下的一个子元素。
- 以下( )区分元素类型 A: nth-child(n) B: nth-last-child(n) C: first-child D: nth-of-type(n)
- CSS3中,( )选择器用于为父元素中的第3个子元素设置样式。 A: :last-child(3) B: :first-child(3) C: :nth-child(3) D: :nth-last-child(3)