CSS3选择器(四)结构性伪类10
DIV+CSS 2010/12/16 14:13:43 点击:不统计
%77w%77%2E%66%6F%72%61%73%70%2E%63%6E
第二十二节:CSS3选择器之:结构性伪类 E:empty
语法:
E:empty : {attribute}
相关伪类:E:root | E:nth-child | E:nth-last-child | E:nth-of-type | E:nth-last-of-type | E:last-child | E:first-of-type | E:only-child | E:only-of-type
说明:
匹配没有任何子元素(包括text接点)的元素E
兼容性:
Firefox3.0,Chrome1.0,Chrome2.0,Opera9.63,Safari3.1,Safari 4Public beta
代码示例:
<style type="text/css">
strong:empty {display:block;width:200px;height:20px;background-color:#EEEEEE;}
</style>
<div style="width:733px; border: 1px solid #666; padding:5px;">
<div style="width:733px; border: 1px solid #666; padding:5px;">
<p>匹配没有任何子元素(包括text节点)的元素E</p>
<strong></strong>
</div>
学习www.网for站asp制.cn作
·上一篇:CSS3选择器(四)结构性伪类9 >> ·下一篇:font-family:中文字体的英文名称 >>