B
B
bpGusar2018-03-15 11:53:42
css
bpGusar, 2018-03-15 11:53:42

Displaying the ruble icon on the page while the code should contain rub?

How can I display the ruble icon on the page while the code should say rub?
Example:
<span>Руб</span>and on the page there will be a ruble icon.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey Epifanov, 2018-03-15
@kacheleff

the icon can be made a pseudo-element, and the block with the text itself can be hidden. but it is not clear why this is needed
example on the codepen
note that a special font is connected to display the character

I
Igor Koch, 2018-03-15
@amux

In your case, you can do this: https://jsfiddle.net/j8gaLsu8/14/
If without JS, then only with the addition of a class, css cannot read the content of the tag

N
Nurlan, 2018-03-15
@daager

Doing so is ugly

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question