CSS 参考手册教程
CSS3 :last-of-type 选择器
CSS3 :last-of-type 选择器
CSS3 :last-of-type 选择器
完整CSS选择器参考手册实例
指定其父级的最后一个p元素的背景色:
p:last-of-type
{
background:#ff0000;
}
{
background:#ff0000;
}
尝试一下 »
定义和用法
:last-of-type选择器匹配元素其父级是特定类型的最后一个子元素。
提示: 和:nth-last-of-type(1)是一个意思。
浏览器支持
表格中的数字表示支持该属性的第一个浏览器版本号。
选择器 | |||||
---|---|---|---|---|---|
:last-of-type | 4.0 | 9.0 | 3.5 | 3.2 | 9.6 |
完整CSS选择器参考手册
CSS3 :last-of-type 选择器 |
---|
CSS 参考手册
CSS 参考手册提供了完整的 CSS 属性列表,每个属性都配有语法说明及实例演示,另外还讲解了 CSS 选择器、颜色值及浏览器支持等相关内容。