Adding HTML entities using CSS content

后端 未结 9 1235
长情又很酷
长情又很酷 2020-11-22 06:57

How do you use the CSS content property to add HTML entities?

Using something like this just prints  

9条回答
  •  无人共我
    2020-11-22 07:23

    In CSS you need to use a Unicode escape sequence in place of HTML Entities. This is based on the hexadecimal value of a character.

    I found that the easiest way to convert symbol to their hexadecimal equivalent is, such as from ▾ () to \25BE is to use the Microsoft calculator =)

    Yes. Enable programmers mode, turn on the decimal system, enter 9662, then switch to hex and you'll get 25BE. Then just add a backslash \ to the beginning.

提交回复
热议问题