好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

【CSS3】-last-of-type选择器+nth-last-of-type(n)选择器_html

last-of-type选择器

“:last-of-type”选择器和“:first-of-type”选择器功能是一样的,不同的是他选择是父元素下的某个类型的最后一个子元素。

示例演示

通过“:last-of-type”选择器,将容器“div.wrapper”中最后一个段落元素背景设置为橙色

( 提示: 这个段落不是“div.wrapper”容器的最后一个子元素)。

HTML代码:

我是第一个段落

我是第二个段落

我是第三个段落

我是第一个Div元素

查看更多关于【CSS3】-last-of-type选择器+nth-last-of-type(n)选择器_html的详细内容...

  阅读:31次