CSS3选择器(四)结构性伪类1
DIV+CSS 2010/12/14 15:45:32 点击:不统计
http://%77%77%77%2E%66网站制作%6F学习网%72%61%73%70%2E%63%6E
第十三节:CSS3选择器之:结构性伪类E:root
语法:
E:root:{attribute}
相关伪类:E:nth-child(n) | E:nth-last-child(n) | E:nth-of-type(n) | E:nth-last-of-type(n) | E:last-child | E:first-of-type | E:only-child | E:only-of-type | E:empty
说明:
匹配文档的根元素,在HTML中,根元素永远是HTML
兼容性:
Firefox2.0,Firefox3.0,Firefox3.5,Chrome1.0,Chrome2.0,Opera9.63,Safari3.1,Safari 4Public beta
代码示例:
<style type="text/css">
html:root {background-color:#DCDCDC;}
</style>
<div style="width:733px; border: 1px solid #666;
padding:5px;">
<p>结构性伪类 E:root</p>
</div>
注:在HTML文件中,根元素永远是HTML,也就是说只有html:root设置才有效
·上一篇:CSS3选择器(三)子串匹配的属性选择符 >> ·下一篇:CSS3选择器(三)结构性伪类2 >>