我在“清除”我在表格行上使用的线路时遇到了麻烦。我不希望链接上的直通效果。我正在使用 Javascript 动态更改 tr 类,所以我希望它尽可能简单。
我当前的代码:
HTML:
<table>
<tr class="table-item">
<td>Text</td>
<td><a href="#">Delete item</a></td>
</tr>
</table>
CSS:
.table-item td {
text-decoration: line-through;
}
.table-item a {
text-decoration: none;
}
有什么建议么?