选择器——:nth-last-child(n),

    xiaoxiao2023-11-21  6

    :nth-last-child(n)

    理论:

    :nth-last-child(n)等价:nth-last-of-type(n)选择器匹配同类型中的倒数第n个同级兄弟元素。n可以是一个数字,一个关键字,或者一个公式。

    代码块及效果图

    :last-child

    理论:

    :last-child选择器用来匹配父元素中最后一个子元素。提示: p:last-child等同于p:nth-last-child(1)。

    代码及效果图

    转载请注明原文地址: https://ju.6miu.com/read-1284186.html
    最新回复(0)