我无法让自定义字体在IE7和IE8中正常工作:
在IE9,Firefox和Chrome中可以正常工作...
对于Firefox和Chrome,字体为TTF格式 而对于IE,则为EOT格式
然而,它只能在IE9中正常工作 :(
我无法让自定义字体在IE7和IE8中正常工作:
在IE9,Firefox和Chrome中可以正常工作...
对于Firefox和Chrome,字体为TTF格式 而对于IE,则为EOT格式
然而,它只能在IE9中正常工作 :(
@font-face {
font-family: 'fontName';
src: url('/path/to/font.eot?') format('eot'),
url('/path/to/font.otf') format('otf'),
url('/path/to/font.ttf') format('truetype');
}
@font-face {
font-family: Graublauweb; /*any name for your font*/
src: url('Graublauweb.eot'); /* IE9 Compatibility Modes */
src: url('Graublauweb.eot?') format('eot'), /* IE6-IE8 */
url('Graublauweb.woff') format('woff'), /* Modern Browsers */
url('Graublauweb.ttf') format('truetype'), /* Safari, Android, iOS */
url('Graublauweb.svg#svgGraublauweb') format('svg'); /* Legacy iOS */
}
您需要发送正确的EOT文件MIME类型。在Apache中,将以下内容添加到您的.htaccess文件中应该可以解决问题。
AddType application/vnd.ms-fontobject eot
AddType font/ttf ttf
AddType font/otf otf
AddType font/x-woff woff