Overriding @font-face src URL?

后端 未结 2 1135
一个人的身影
一个人的身影 2021-01-03 21:34

We are using FontAwesome with Bootstrap. However, when we try to use FA with our custom minifier, it attempts to load the fonts from a relative path, which returns a 404, du

2条回答
  •  孤街浪徒
    2021-01-03 22:18

    Simple override the font-family of the base CSS class:

    .fa {
      font-family: 'FontAwesome2' !important;
    }
    

    Then, paste/include and edit the font definition:

    @font-face {
      font-family: 'FontAwesome2';
      src: url('//host.domain/yourpath/fontawesome-webfont.eot?v=3.1.0');
      ...
      font-style: normal;
    }
    

提交回复
热议问题