Using a different font with twitter bootstrap

后端 未结 5 443
别那么骄傲
别那么骄傲 2020-12-08 00:54

I want to use a different font for my website, which is not a regular webfont. I have created EOT files already. Now how can I integrate those fonts with twitter bootstrap ?

5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-08 01:17

    You can find a customizer on the official website, which allows you to set some LESS variables, as @font-family-base. Link your custom fonts in your layout, and use your custom generated bootstrap style.

    Link here

    For an example with the @font-face rule, using WOFF format (which is pretty good for browser compatibility), add this CSS in your app.css file and include your custom boostrap.css file.

    @font-face {
      font-family: 'Proxima Nova';
      font-style:  normal;
      font-weight: 400;
      src: url(link-to-proxima-nova-font.woff) format('woff');
    }
    

    Please note Proxima Nova is under a license.

提交回复
热议问题