Infinity symbol with HTML

被刻印的时光 ゝ 提交于 2019-11-27 11:23:52

问题


How can I display an infinity symbol (like the one in the picture) using HTML?


回答1:


Use the HTML entity ∞ or ∞.




回答2:


You can use the following:

  • literal: (if the encoding you use can encode it — UTF-8 can, for example)
  • character reference: ∞ (decimal), ∞ (hexadecimal)
  • entity reference: ∞

But whether it is displayed correctly does also depend on the font the text is displayed with.




回答3:


This does not require a HTML entity if you are using a modern encoding (such as UTF-8). And if you're not already, you probably should be.




回答4:


From Wikipedia:

∞ 



回答5:


According to List of XML and HTML character entity references:

∞ 

The Google search using your original question gets several useful results: How can I display an infinity symbol using HTML.




回答6:


∞




回答7:


According to this page, it's ∞.




回答8:


Like ЯegDwight said, you can use the HTML entity ∞ or ∞. A easy source of getting these codes, is to look at this entity list.

You can also use them in CSS, which was what I was looking for, just like font-awesome does. A simple CSS based solution would be to have something like:

.infinity-ico:before {     content: '\221E'; } 



回答9:


Infinity is a reserved character in HTML. Following are its values in various forms.

  • Hex : 8734
  • Decimal : 221E
  • Entity : ∞

To use in html code

<p>The html symbol is &#8734; </p>  <p>The html symbol is &#x221E; </p>  <p>The html symbol is &infin; </p>

Reference : HTML Symbols - HTML Infinity Symbol



来源:https://stackoverflow.com/questions/2254913/infinity-symbol-with-html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!