开发者

@font-face files does not load offline

I'm having trouble using @font-face with fonts located on my machine. My files aren't on a server yet. I'm trying to preview them offline, but they aren't loading.

Here is the code from the css file:

@font-face{
   font-family:"chunk";
   src: url('file:///C:/...Fonts/Chunkfive.otf');
}
div{
   font-family:"chunk";
}

Has anyone had similar problems开发者_JAVA百科?


Include them in your site folder, and reference them as you do with images.


@pvenkat; if your font folder & css in same folder then just write this Fonts/Chunkfive.otf in your url path & if your css folder some other folder like in stylesheet folder then write ../Fonts/Chunkfive.otf in your path may be that's work for you.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜