开发者

@font-face function not working

Can't seem to get this to work in any browser, anyone know what I am doing wrong?

Running live here: http://daveywhitney.com/ford/one/

@font-face {
    font-family: 'SackersItalianScriptStdRegula';
    src: url('font/sackersitalianscriptstd-webfont.eot');
    src: url('font/sackersitalianscriptstd-webfont.woff') format('woff'), url('font/sackersitalianscriptstd-webfont.ttf') format('truetype'), url('font/sackersitalianscriptstd-webfont.svg#webfontkWmYBTH2') format('svg');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'EngraversMTRegular';
    src: url('font/engr-webfont.eot');
    src: url('font/engr-webfont.woff') format('woff'), url('font/engr-webfont.ttf') format('truetype'), url('font/engr-webfont.svg#webfontQUS0Zswo') format('svg');
    font-weight: normal;
    font-style: normal;
}    

#sidetop {
    width:90px;
    height:50px;
    fon开发者_如何学Pythont-size: 12px;
    font-family:EngraversMTRegular;
}

#sidetop ul li {
    float:right;
    margin:0 0 10px 0;
    font-family:EngraversMTRegular;
}

#names {
    width:150px;
    height:250px;
    float:right;
    overflow-y: scroll;
    font-size:30px;
    font-family:SackersItalianScriptStdRegula;
    color:#858484;
    margin:0 0 0 50px;
    font-weight:normal;
}


Your paths to the font files are not what you have posted here. In the CSS files, your URLs look like this: url('/font/engr-webfont.eot'). That means that your font is expected to live at http://daveywhitney.com/font/engr-webfont.eot. The leading slash makes the url relative to the server root, not to the style sheet. Rather than having us guess at things, perhaps you could tell us what your directory structure looks like -- where the fonts live in relation to the css file.


The URLs are wrong. For example, I don't get a font file here:

http://daveywhitney.com/ford/one/css/font/engr-webfont.woff
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜