可能重复:
如何让这个 CSS 文本装饰覆盖工作?
Chrome 和 Firefox 正在密谋阻止我尝试使用 td 与 line-through text-decoration,有时会被跨度禁用,如下所示:
<style type="text/css">
tr.st td {
text-decoration: line-through;
}
tr.st td span.unstrike{
text-decoration: none;
background:yellow;
}
tr.st td span#unstrike-id{
text-decoration: none;
background:yellow;
}
tr.st td span.unstrike-important{
text-decoration: none ! important;
background:yellow;
}
</style>
<table border>
<tbody>
<tr>
<td>normal</td>
</tr>
<tr class="st">
<td>struck out</td>
</tr>
<tr class="st">
<td>struck out <span class="unstrike">unstrike class: shouldn't I be normal?</span></td>
</tr>
<tr class="st">
<td>struck out <span id="unstrike-id">unstrike-id identifier. Shouldn't I be normal?</span></td>
</tr>
<tr class="st">
<td>struck out <span class="unstrike-important">unstrike-important: shouldn't I be even more normal?</span></td>
</tr>
</tbody>
</table>
我眯着眼睛看规格,我不明白。
文本修饰的特殊情况?是什么赋予了?
演示在这里