CSS中的上标? [英] Superscript in CSS only?
问题描述
我有一个样式表,我用一个上标字符标记外部链接,但我有一个
我现在看起来像这样:
a.external:after {
font-size:50%;
vertical-align:top;
content:+;
}
但不起作用。
当然,我会使用< sup>
-tag,只有 content
允许HTML ...
您可以使用 vertical-align:super
(加上随附的 font-size $但是,请务必在这里阅读其他答案,特别是。 =http://stackoverflow.com/questions/501671/superscript-in-css-only#572967> paulmurray 和 cletus ,以获取有用的信息。
How can I get superscript done, only in CSS?
I have a stylesheet where I mark the external links with a superscript character, but I'm having a hard time getting the character aligned correctly.
What I have currently, looks like this:
a.external:after {
font-size: 50%;
vertical-align: top;
content: "+";
}
but it doesn't work.
Naturally, I'd use the <sup>
-tag, only if content
would allow for HTML...
You can do superscript with vertical-align: super
, (plus an accompanying font-size
reduction).
However, be sure to read the other answers here, particularly those by paulmurray and cletus, for useful information.
这篇关于CSS中的上标?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!