CSS参考手册
»
选择符列表
»
伪类选择符
»
相关内容:
其它伪类选择符参考
选择其它项
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:empty
版本:CSS3
语法:
E:empty
{ sRules }
说明:
匹配没有任何子元素(包括text节点)的元素E。
兼容性:
浅绿
= 支持
红色
= 不支持
墨绿
= 部分支持
橙色
= 实验性质
支持版本
\类型
IE
Firefox
Safari
Chrome
Opera
较早版本
6.0-8.0
4.0
5.1
13.0
11.50
较新版本
9.0
示例:
<!DOCTYPE html> <html lang="zh-cn"> <head> <meta charset="utf-8" /> <title>CSS 结构性伪类选择符 E:empty_CSS参考手册_web前端开发参考手册系列</title> <meta name="author" content="phpstudy.net" /> <meta name="copyright" content="www.phpstudy.net" /> <style> p:empty{height:25px;border:1px solid #ddd;background:#eee;} </style> </head> <body> <div class="test"> <p>结构性伪类选择符 E:empty</p> <p><!--我是一个空节点p,请注意我与其它非空节点p的外观有什么不一样--></p> <p>结构性伪类选择符 E:empty</p> </div> </body> </html>