【发布时间】:2018-07-25 00:26:11
【问题描述】:
我希望我的文本有 2 个删除线,但仅使用内联 CSS。
我怎样才能做到这一点?
【问题讨论】:
我希望我的文本有 2 个删除线,但仅使用内联 CSS。
我怎样才能做到这一点?
【问题讨论】:
您可以将del 标记与text-decoration-style: double 一起使用作为双删除线。
<del style="text-decoration-style: double;">Text with double strike through</del>
要对span 或其他标记内的普通文本应用双删除线,您可以使用text-decoration: line-through 和text-decoration-style: double。
<span style="text-decoration: line-through; text-decoration-style: double;">Text with double strikethrough</span>
【讨论】:
你可以使用渐变:
<span style="background:linear-gradient(#000,#000) 50% 35%/100% 1px no-repeat,linear-gradient(#000,#000) 50% 65%/100% 1px no-repeat;">some text to strike</span>
【讨论】: