Html 显示注册符号的html代码是什么
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4336363/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What is the html code to show the registered symbol
提问by Jacob
Not ®
that shows a registered symbol next to text, I want the small one that sits on the top right hand corner of text. What is the entity code for that?
不是®
在文本旁边显示注册符号,我想要位于文本右上角的小符号。实体代码是什么?
回答by BalusC
There's none. Just use <sup>
(superscript)to put it on "top right".
没有。只需使用<sup>
(上标)将其放在“右上角”即可。
<p>StackOverflow<sup>®</sup></p>
Which should show up as StackOverflow®instead of StackOverflow®.
这应该显示为 StackOverflow ®而不是 StackOverflow®。
回答by Surreal Dreams
<sup>®</sup>
The ® code itself is a "regular" character - use <sup>
tags to superscript it and get that effect. Or in CSS, apply the following style to the character:
® 代码本身是一个“常规”字符 - 使用<sup>
标签为其添加上标并获得该效果。或者在 CSS 中,将以下样式应用于字符:
vertical-align: super;
So there is no "preformatted" character like ™ which is already super-scripted and small. You have to do it yourself.
所以没有像 ™ 这样的“预格式化”字符,它已经是超级脚本并且很小。你必须自己做。
回答by Brad
Or if you don't exactly likethe way that <sup>%reg;</sup>
renders, you can always customize it: something like
或者,如果你不正是像的方式<sup>%reg;</sup>
呈现,你可以随时对其进行自定义:像
<span class="sup">®</span>
.sup {
font-size: 70%;
vertical-align: super;
}
note:this is untested CSS
注意:这是未经测试的 CSS
回答by Veign
Try:
尝试:
<sup>®</sup>
回答by Shashank Pawar
You can also use Hex value for Reg symbol code: ®
您还可以使用十六进制值作为 Reg 符号代码: ®