Russian ruble symbol HTML code?

后端 未结 16 1277
甜味超标
甜味超标 2020-12-08 19:24

Since Russian central bank already approved the new symbol for Russian ruble, is there any HTML code for it? Or I need to use png images?

相关标签:
16条回答
  • 2020-12-08 19:55

    Just search rubl sign using google, then find that sign and copy it. Now you have that symbol just pasting left. Paste everywhere you want. This is more simple way to do it.

    You can copy it from here too. Now I left that symbol: ₽ Have a great coding, have much fun.

    0 讨论(0)
  • 2020-12-08 19:58

    Use ₽ html mnemonic

    ₽ 100

    0 讨论(0)
  • 2020-12-08 19:58

    There are also two dedicated Bootstrap glyphicons for it:

    <span class="glyphicon glyphicon-ruble"></span> <span class="glyphicon glyphicon-rub"></span>

    0 讨论(0)
  • 2020-12-08 19:58

    You may want to use the Intl.NumberFormat object.

    var amount = 654321.987;
    
    console.log(new Intl.NumberFormat('ru-RU', {
      style: 'currency',
      currency: 'RUB'
    }).format(amount));

    0 讨论(0)
  • 2020-12-08 20:00

    You can fake it by using a strikethrough text decoration.

    HTML 4.00 and earlier

    Bunnies 100 <strike>P</strike>
    

    Produces this: Bunnies 100 P

    HTML 4.01 and later

    Bunnies 100 <del>P</del>
    

    Produces this: Bunnies 100 P

    CSS text-decoration

    Bunnies 100 <span style="text-decoration:line-through">P</span>
    

    doesn't work in the SO renderer

    0 讨论(0)
  • 2020-12-08 20:01

    Since 16 June 2014 there is a letter in unicode: \u20bd representing RUB currency sign:

    So, the answer to the question: HTML entity which should be used for RUB sign is &#x20bd;

    Though, I suppose currently not all fonts are capable of showing it. Ability to see the sign in browser generally depends on your system fonts. As of today my Mac OS web fonts are showing it correctly, but I didn't check it on Windows and Linux.

    Therefore it is not recommended to use this new sign when it is critical for reader to see it relying only on system fonts, that might be stale. If you want to be confident that the sign will be displayed you will need to provide your own font at least for paragraphs that may contain RUB sign.

    From Wikipedia:

    On 4 February 2014, the Unicode Technical Committee during its 138th meeting in San Jose accepted U+20BD ₽ ruble sign symbol for the Unicode version 7.0, the symbol was then included into Unicode 7.0 released on 16 June 2014.

    http://en.wikipedia.org/wiki/Russian_ruble#Currency_symbol

    0 讨论(0)
提交回复
热议问题