我正在使用CSS中的text-decoration: line-through
,但我似乎找不到任何方法来改变线条粗细,而不使用<hr>
或图像覆盖等不雅的技巧。
有没有什么优雅的方法来指定划线的粗细?
发布于 2014-04-10 19:05:26
这似乎是一个长期存在的问题,对于多行删除没有理想的解决方案。
使用CSS渐变可以方便地调整线条粗细,如下所示:
strike {
text-decoration: none;
background-image: linear-gradient(transparent 7px,#cc1f1f 7px,#cc1f1f 9px,transparent 9px);
}
请在此处查看演示和完整的供应商前缀:http://codepen.io/pearlchen/pen/dhpxu
https://stackoverflow.com/questions/2539207
复制相似问题