我@font-face在我公司的网站上使用,它的工作/看起来很棒.除了Firefox和Chrome将在该.woff文件上引发404错误.IE不会抛出错误.我有字体位于根,但我已经尝试使用css文件夹中的字体,甚至给出了字体的整个网址.如果从我的css文件中删除这些字体,我没有得到404,所以我知道这不是语法错误.
另外,我使用fontsquirrels工具来创建@font-face字体和代码:
@font-face {
font-family: 'LaurenCBrownRegular';
src: url('/laurencb-webfont.eot');
src: local('?'),
url('/laurencb-webfont.woff') format('woff'),
url('/laurencb-webfont.ttf') format('truetype'),
url('/laurencb-webfont.svg#webfontaaFhOfws') format('svg');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'FontinSansRegular';
src: url('/fontin_sans_r_45b-webfont.eot');
src: local('?'),
url('/fontin_sans_r_45b-webfont.woff') format('woff'),
url('/fontin_sans_r_45b-webfont.ttf') format('truetype'),
url('/fontin_sans_r_45b-webfont.svg#webfontKJHTwWCi') format('svg');
font-weight: normal;
font-style: normal;
}
Run Code Online (Sandbox Code Playgroud)