根据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>
这是测试中的错误,还是我在某个地方犯了错误?