@fontface works on http://www.domain.com but doesn't work on http://domain.com

前端 未结 2 1934
旧时难觅i
旧时难觅i 2021-01-25 08:16

@fontface works when I load http://www.grozav.com but doesn\'t work on http://grozav.com .

What can I do to fix this?

 @font-face {
    fon         


        
2条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-25 08:59

    Why specify the full URL? Just put:

    src: url('/font/giacco.ttf');
    

    It might be a case that @fontface doesn't work cross-domain. FireFox has an issue with this.

    But if you are using a file from within the same domain, just don't specify the full domain, and just the supply the path to the ttf file.

提交回复
热议问题