发现了一个有趣的问题,我认为应该起作用。假设我们有如下所示的html:
<style>
td {
padding: 10px 20px;
}
tr:not(.fill):last-child {
background-color: orange;
}
</style>
<table>
<tr>
<td>Row 1</td>
</tr>
<tr>
<td>Row 2</td>
</tr>
<tr>
<td>Row 3</td>
</tr>
<tr class="fill">
<td>Row 4</td>
</tr>
</table>
目的是突出显示第三行,但当前的CSS选择器不起作用。是否可以选择最后一个非“填充” tr?