【css】:last-child 选择器
CSS3 :last-child 选择器:last-child 选择器用来匹配父元素中最后一个子元素。eg:指定父元素 ul 中最后一个 li 元素,并设置背景颜色:li:last-child {background-color: #ff0000;}
·
CSS3 :last-child 选择器
:last-child 选择器用来匹配父元素中最后一个子元素。
eg:指定父元素 ul 中最后一个 li 元素,并设置背景颜色:
li:last-child {
background-color: #ff0000;
}
更多推荐
已为社区贡献1条内容
所有评论(0)