企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持知识库和私有化部署方案 广告
[CSS参考手册](http://css.doyoe.com/)»[选择符列表](#)»[伪类选择符](#)» 相关内容: [**其它伪类选择符参考**选择其它项](#) - [E:link](#) - [E:visited](#) - [E:hover](#) - [E:active](#) - [E:focus](#) - [E:lang()](#) - [E:not()](#) - [E:root](#) - [E:first-child](#) - [E:last-child](#) - [E:only-child](#) - [E:nth-child(n)](#) - [E:nth-last-child(n)](#) - [E:first-of-type](#) - [E:last-of-type](#) - [E:only-of-type](#) - [E:nth-of-type(n)](#) - [E:nth-last-of-type(n)](#) - [E:empty](#) - [E:checked](#) - [E:enabled](#) - [E:disabled](#) - [E:target](#) - [@page:first](#) - [@page:left](#) - [@page:right](#) # 结构性伪类选择符 E:last-child - **版本:CSS3** ### 语法: **E:last-child**{ sRules } ### 说明: **匹配父元素的最后一个子元素E。** - 要使该属性生效,E对象必须是某个对象的子元素。 ### 兼容性: - 浅绿 = 支持 - 红色 = 不支持 - 墨绿 = 部分支持 - 橙色 = 实验性质 <table class="gdataform"><thead><tr><th><a href="#browser" title="查看本文档测试时所用浏览器版本">支持版本</a>\类型</th> <th><span class="browser-ie">IE</span></th> <th><span class="browser-firefox">Firefox</span></th> <th><span class="browser-safari">Safari</span></th> <th><span class="browser-chrome">Chrome</span></th> <th><span class="browser-opera">Opera</span></th> </tr></thead><tbody><tr><th>较早版本</th> <td class="unsupport">6.0-8.0</td> <td rowspan="2" class="support">4.0</td> <td rowspan="2" class="support">5.1</td> <td rowspan="2" class="support">13.0</td> <td rowspan="2" class="support">11.50</td> </tr><tr><th>较新版本</th> <td class="support">9.0</td> </tr></tbody></table> ### 示例: # 注意是li:last-child,而不是ul:last-child - 结构性伪类选择符 E:last-child - 结构性伪类选择符 E:last-child - 结构性伪类选择符 E:last-child - 结构性伪类选择符 E:last-child Copyright © 2006-2012 [Doyoe](http://www.doyoe.com/). All Rights Reserved