Search code examples
cssbootstrap-icons

How can I use code point of Bootstrap Icons?


Summary of the problem

The following image is a description of bootstrap icon.

I don't know how to use "Code point".

  • Unicode: U+F120

  • CSS: \F120

  • JS: \uF120

  • HTML: &#xF120


Solution

  • For Using HTML code point, All you need is just set the the font-family of your element(or your body) to 'Bootstrap-icons' and then everything will work.

    <!DOCTYPE html>
    <html>
    
      <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css">
      <style>
        .test
        {
          font-family:'Bootstrap-icons';
        }
    </style>
      <body>
        <div class="test">
          &#xF120
        </div>
      </body>
    </html>