• 2025-10-17
css选择器:last-child与last-of-type区别

:last-child选择父元素中最后一个且符合指定类型的子元素,而:last-of-type选择父元素中该类型最后一个元素;例如在包含p、p、span的div中,p:last-child不匹配(最后......

11