我的HTML是:
<html>
<body>
<div id="example">this is example</div>
</body>
<html>
Run Code Online (Sandbox Code Playgroud)
我的css是:
#example{text-decoration: line-through;color:#ccc;}
Run Code Online (Sandbox Code Playgroud)
我这样输出了
但我想要这样
但我不能.帮帮我这样做.
ben*_*c_b 20
颜色适用于直通和文本.你需要像窝一样.
<span style="text-decoration: line-through; color: red;">
<span style="color: #CCC;">text with red linethrough and black text</span>
</span>
Run Code Online (Sandbox Code Playgroud)
资料来源:http://www.savio.no/artikler/a/335/different-font-color-than-line-through-color-with-css