【css】:last-child 选择器_css last-child-CSDN博客

网站介绍:文章浏览阅读5.4k次。CSS3 :last-child 选择器:last-child 选择器用来匹配父元素中最后一个子元素。eg:指定父元素 ul 中最后一个 li 元素,并设置背景颜色:li:last-child { background-color: #ff0000;}_css last-child