【发布时间】:2009-12-06 21:30:18
【问题描述】:
根据 css3.info 的 selector test,Firefox 3.0 支持 nth-child 选择器的一些排列。但是,here (#30) 显示的代码对我不起作用。
它应该选择空段落,所以我将我的代码编辑为以下,但它没有在 Firefox 中显示(它在 Opera 中有效)。
<style type="text/css">
div :nth-child(even) {
background-color: yellow;
height: 30px;
}
</style>
<div>
<div>Does this element match?</div>
<div></div>
<div>Does this element match?</div>
<div></div>
</div>
这是测试中的错误,还是我在某个地方出错了?
【问题讨论】:
标签: firefox css-selectors css