CSS3在倾斜形式的文本上穿行样式?
CSS3中是否可以在文本字符串上倾斜一条删除线(通过CSS的text-decoration:line-through属性实现),例如从文本的左下角到右上角(对角线)?
Is it possible in CSS3 to slant a strike-off line (achieved with css's text-decoration: line-through property) over a text string, say from bottom-left of the text to top-right (diagonal line)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不知道。如果不是,你可以做的就是在它上面放一个 div,给它的一个边框上色并倾斜它。
I don't know. What you could do if it isn't is put a div on top of it, color one of its borders and slant it.
不 - line-through 属性不适用于此目的,并且不能以这种方式使用。它仅向字符/字符串添加水平线。如果你想添加一条对角线,你可能必须在文本上使用一个图层,其中包含 PNG/作为背景或画布。
No - the line-through property is not intended for that and can't be used that way. It only adds Horizontal Lines to Characters / Strings. If You want to add an diagonal Line you would have to use maybe a layer over the Text with an PNG in it / as background Or Canvas.