how to render unicode correctly

1

Good afternoon everyone! Galera, following, I have the following code "& # x25Bc" it has to render in the browser an up arrow ... however, when launching in the "content" of before, it renders exactly those characters and not the arrow symbol ... what could be the cause of it? text editor encoding? syntax? What do they suggest? follow the excerpt that I used in the before ...

before{content: '\&#x25Bc';}

I've also tried variations ...

before{content: "\&#x25Bc";}

and nothing of the symbol appears ...

    
asked by anonymous 07.12.2018 / 18:34

2 answers

1

I used another code to put the arrow

.teste::before{
  content: "91";
}
<div class="teste">
</div>

I've used this list , if you do not want this arrow just check the list and change in your code.

    
07.12.2018 / 18:48
0

Actually you need to "escape" the hexadecimal Unicode with a counter bar \

Then your escaped Unicode would look like this: &#x25Bc = Bc or escape25Bc (4 or 6 digits)

Reference link for this unicode : link

SeewhatitsaystoW3C

  

CSSrepresentsescapedcharactersinadifferentway.Escapesstartwithabackslashfollowedbythehexadecimalnumberthatrepresentsthecharacter'shexadecimalUnicodecodepointvalue.

PORTUGUESE"CSS represents characters of Escapes in a different way. %code% start with a backslash followed by the hexadecimal number that represents the hexadecimal value of the Unicode code point of the character."

W3C official link on the subject: link

.icon::before{
  content: "Bc";
}
<div class="icon"></div>
(&#x25Bc) = &#x25Bc; = content: "Bc";
    
08.12.2018 / 22:46