CSS3在倾斜形式的文本上穿行样式?

发布于 2024-09-27 02:31:32 字数 99 浏览 0 评论 0原文

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

想念有你 2024-10-04 02:31:32

我不知道。如果不是,你可以做的就是在它上面放一个 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.

心作怪 2024-10-04 02:31:32

不 - 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文