【发布时间】:2011-08-13 06:15:46
【问题描述】:
我有这样的事情
<table>
<tr>
<td>First table</td>
</tr>
</table>
<table>
<tr>
<td>Second table</td>
</tr>
</table>
还有下面的 CSS
table {
margin-bottom:40px;
}
table:last-child {
margin-bottom:0px;
}
但第二个表格仍然应用了 margin-bottom。做什么?
【问题讨论】:
-
Cannot reproduce(在 Chrome 中测试)。要么您使用的浏览器不支持
:last-child,要么您减少的测试用例已经减少到无法重现问题。
标签: html css css-selectors