用CSS为特定字符设置样式 [英] Style certain characters with CSS
本文介绍了用CSS为特定字符设置样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我假设这是不可能的,但为了万一它是或有人有一个很好的技巧他们的袖子,有一种方法使用CSS定位某些字符?
I'm assuming it's not possible, but just in case it is or someone has a nice trick up their sleeves, is there a way to target certain characters using CSS?
例如,使所有字母 z
在段落红色,或在特定情况下设置 vertical-align:sup
c>
For example make all letters z
in paragraphs red, or in my particular case set vertical-align:sup
on all 7
in elements marked with the class chord
.
推荐答案
这在CSS中是不可能的。您唯一的选择是 第一封信
,这不会削减它。请使用JavaScript或(如您在注释中所述)您的服务器端语言。
That's not possible in CSS. Your only option would be first-letter
and that's not going to cut it. Either use JavaScript or (as you stated in your comments), your server-side language.
这篇关于用CSS为特定字符设置样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文