CSS3中,( )选择器用于为父元素中的第3个子元素设置样式。
A: :last-child(3)
B: :first-child(3)
C: :nth-child(3)
D: :nth-last-child(3)
A: :last-child(3)
B: :first-child(3)
C: :nth-child(3)
D: :nth-last-child(3)
举一反三
- CSS3中,( )选择器用于为父元素中的第一个子元素设置样式。 A: :last-child B: :first-child C: :not D: :nth-child(3)
- CSS3中,如果某个父元素仅有一个子元素,则使用()选择器不能选择这个子元素。 A: :nth-child(1) B: :last-child C: :child D: :only-child
- CSS3中,( )选择器用于为父元素中的倒数第二个子元素设置样式。 A: :last-child(2) B: :first-child(2) C: :nth-child(2) D: :nth-last-child(2)
- CSS3选择器中:first-child选择器和:last-child选择器分别用于为父元素中的第一个或者最后一个子元素设置样式
- first -child选择器只能获取父级元素下的一个子元素。