CSS @font-face not working with Firefox, but working with Chrome and IE

后端 未结 28 2952
野趣味
野趣味 2020-11-22 06:27

The following code works in Google Chrome beta as well as IE 7. However, Firefox seems to have a problem with this. I\'m suspecting it to be a problem of how my CSS files ar

28条回答
  •  闹比i
    闹比i (楼主)
    2020-11-22 06:27

    One easy solution that no one's mentioned yet is embedding the font directly into the css file using base64 encoding.

    If you're using fontsquirrel.com, in the font-face Kit Generator choose expert mode, scroll down and select Base64 Encode under CSS Options - the downloaded Font-Kit will be ready to plug and play.

    This also has the fringe benefit of reducing page load time because it requires one less http request.

提交回复
热议问题