Adding HTML entities using CSS content

后端 未结 9 1263
长情又很酷
长情又很酷 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:41

    Here are two ways:

    • In HTML:

    This will result into ⛱

    • In Css:

      .ics::before {content: "\9969;"}

    with HTML code

    This also results in ⛱

提交回复
热议问题