Home html Ruble sign in pseudo-class content

Ruble sign in pseudo-class content




As you know, to write a ruble sign on the page, its html code is used: & amp; # 8381; , respectively, we get: ₽, but when you insert it into the content of the pseudo-element, the sign code is displayed on the page, instead of himself.
How to be?

Answer 1, authority 100%

Insert unicode character code eg. The ruble sign has the code 20BD .

. test: after {
   content: "\ 20BD";
& lt; div class = "test" & gt;
& lt; / div & gt; 

Answer 2, authority 99%

You can specify not & amp; # 8381; , but its code in UNICODE :

p: after {
  content: "\ 20BD";
& lt; p & gt; 100 & lt; / p & gt; 

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions