我已经在服务器上使用了此字体图标,但是在Mozilla和Internet Explorer中无法使用。
font-family: 'halvettcondensedregular';
src: url('css/fonts/halvettcondensed-webfont.eot');
src: url('css/fonts/halvettcondensed-webfont.eot?#iefix') format('embedded-opentype'),
url('css/fonts/halvettcondensed-webfont.woff') format('woff'),
url('css/fonts/halvettcondensed-webfont.ttf') format('truetype'),
url('css/fonts/halvettcondensed-webfont.svg#halvettcondensedregular') format('svg');
font-weight: normal;
font-style: normal;
最佳答案
除非在.htaccess
文件或IIS server
中定义自定义字体,否则它不会在浏览器上显示。
要为MIME Type
定义字体woff
,请使用application/x-font-woff
。
同样适用于其他字体格式。
注意:所有最新的浏览器均支持字体类型woff
。
更新:
像这样在.htaccess文件中添加
AddType application/vnd.ms-fontobject .eot
AddType font/ttf .ttf
AddType font/otf .otf
AddType application/x-font-woff .woff