@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.
精彩评论