开发者

@Font-face not working?

Im having trouble trying to get the font-face style working locally. I know it should work locally as the folder I downloaded from font-squirrel renders correctly.

Ive copy and pasted everything exactly into the same folder structure开发者_高级运维 supplied by fontsquirrel...

CSS

@font-face {
font-family: 'URWClassicoItalic';
src: url('urw_classico_italic-webfont.eot');
src: url('urw_classico_italic-webfont.eot?#iefix') format('embedded-opentype'),
     url('urw_classico_italic-webfont.woff') format('woff'),
     url('urw_classico_italic-webfont.ttf') format('truetype'),
     url('urw_classico_italic-webfont.svg#URWClassicoItalic') format('svg');
font-weight: normal;
font-style: normal;
}

#primary-navigation {font-family: 'URWClassicoItalic'; font-size:2em}

HTML

<div id="primary-navigation">TEST</div>

My font files are all in the root, same directory as my index file.

Any help would be brilliant, thankyou


@font-face urls that are specified in a separate CSS file must have a url relative to this CSS

for example:

src: url('../urw_classico_italic-webfont.eot');

if the CSS-file is one level above the folder, where the font-file is stored.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜