Infinity symbol with HTML

后端 未结 9 999
轻奢々
轻奢々 2020-12-13 16:26

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

相关标签:
9条回答
  • 2020-12-13 17:05

    According to this page, it's ∞.

    0 讨论(0)
  • 2020-12-13 17:12

    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.

    0 讨论(0)
  • 2020-12-13 17:13

    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.

    0 讨论(0)
  • 2020-12-13 17:13

    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';
    }
    
    0 讨论(0)
  • 2020-12-13 17:17

    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.

    0 讨论(0)
  • 2020-12-13 17:18

    Use the HTML entity ∞ or ∞.

    0 讨论(0)
提交回复
热议问题