table td+td+td+td+td+td{
display:table-cell;
}
+
是什么意思?
最佳答案
所以如果你有某事。像:
<table>
<tr>
<td></td> <!-- starting from here A-->
<td></td> <!-- starting from here B-->
<td></td>
<td></td>
<td></td>
<td></td> <!-- selects this one A -->
<td></td> <!-- selects this one B -->
</tr>
</table>
因此,本例中的最后两个单元格将被选中。参见这里:http://jsfiddle.net/ERkEk/
整个CSS选择器似乎对我来说不是很有用(个人观点)就像对我来说硬编码一样。在某些情况下可能是必要的,但它比使用类更难维护。在这种情况下,您非常依赖标记。
更新: It is supported in all browsers but IE 5.5 and IE 6 and is not 100% supported in IE <= 8.
关于css - 你见过这样的CSS选择器吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3828432/