我正在使我的表格行的背景具有圆角。以下是CSS代码:
<table>
<tr>
<td> first cell </td>
<td> middle cell </td>
<td> third cell </td>
</tr>
</table>
tr:hover {
background-color: #ffff00;
}
tr:hover td:first-child {
border-top-left-radius: 20px;
border-bottom-left-radius: 20px;
}
tr:hover td:last-child {
border-top-right-radius: 20px;
border-bottom-right-radius: 20px;
}
在Chrome上它工作得很好:
但它在Firefox上不起作用:
我做错了什么,如何在Firefox上修复它?
tr
而不是td
,而在Firefox中,tr
显然不能拥有圆角。 - Sebastian Simon