【Web前端】CSS 选择器之 last-child 与 last-of-type

前言 今天在作 demo 时,last-child 与 last-of-type 发生了混淆,在此记录。web last-child 先看一下 w3school 中的解释: :last-child p:last-child 选择属于其父元素最后一个子元素每一个 <p> 元素。svg last-of-type :last-of-type p:last-of-type 选择属于其父元素的最后 <p>
相关文章
相关标签/搜索