我在子表的 tr 内有表我不想应用悬停和斑马条纹,下面是我的代码不起作用,子表显示悬停和斑马条纹:
<table class='zebrastrip'>
<tr>
<td>1</td>
<td>2</td>
</tr>
<tr>
<td>3</td>
<td>4</td>
</tr>
<tr>
<table class='atable'>
<tr>
<td>5</td>
<td>6</td>
</tr>
<tr>
<td>7</td>
<td>8</td>
</tr>
</table>
</tr>
</table>
.atable tr:nth-child(2n-1){
background-color:#FFFFFF;
}
.atable tr:hover{
background-color:#FFFFFF;
}
.zebrastrip tr:nth-child(2n-1){
background-color:#f9f9f9;
}
.zebrastrip tr:hover{
background-color:#fce4cc;
}
谢谢