CSS3 :nth-last-child() 选择器

实例

指定每个 p 元素匹配同类型中的倒数第 2 个同级兄弟元素背景色:

p:nth-last-child(2) { background:#ff0000; }
posted @ 2022-10-20 15:07  疯子110  阅读(20)  评论(0编辑  收藏  举报