nth-child选择的是父元素的第几个子元素,不区分元素类型。
类似的有:
first-child,last-child,nth-last-child
而nth-of-type选择的是父元素的第几个该类型的元素。
类似的有:
nth-last-of-type
nth-child选择的是父元素的第几个子元素,不区分元素类型。
类似的有:
first-child,last-child,nth-last-child
而nth-of-type选择的是父元素的第几个该类型的元素。
类似的有:
nth-last-of-type
本文标题:[CSS] nth-child,nth-of-type
本文链接:https://www.haomeiwen.com/subject/ogpnkttx.html
网友评论