在IE8的IE8开发过程中,我遇到了问题。该网站应该支持IE8。字体将不正确显示。
我使用以下代码:
@font-face {
font-family: 'MyFont';
src: url('./fonts/myfont/eot/Myfont.eot');
src: url('./fonts/myfont/eot/Myfont.eot?iefix') format('eot'),
url('./fonts/myfont/woff/Myfont.woff') format('woff'),
url('fonts/myfont/ttf/Myfont.ttf') format('truetype'),
url('./fonts/myfont/svg/Myfont.svg#webfont') format('svg');
font-weight: normal;
font-style: normal;
}我能做什么才能正确显示字体?
谢谢你的帮助。
发布于 2015-07-21 08:14:06
看起来你没有正确地格式化它
如果您在树外链接,则应该使用../而不是./。
同时,你也错过了truetype的尾声。
eot应该是embedded-opentype
@font-face {
font-family: 'MyFont';
src: url('../fonts/myfont/eot/Myfont.eot');
src: url('../fonts/myfont/eot/Myfont.eot?iefix') format('embedded-opentype'),
url('../fonts/myfont/woff/Myfont.woff') format('woff'),
url('../fonts/myfont/ttf/Myfont.ttf') format('truetype'),
url('../fonts/myfont/svg/Myfont.svg#webfont') format('svg');
font-weight: normal;
font-style: normal;
}
https://stackoverflow.com/questions/31533617
复制相似问题