Internet Explorer @font-face is failing

前端 未结 15 1402
甜味超标
甜味超标 2020-11-27 18:07

I\'m trying to get Internet Explorer to render my pretty fonts. It\'s not working. They work fine in Firefox and I can see in my Apache access logs that IE has pulled the fo

15条回答
  •  广开言路
    2020-11-27 18:56

    What worked for me is the following declaration:

    @font-face {
        font-family: 'Frutiger45LightBoldItalic';
        src: local('☺'), url('../font/frutiger-bolditalic-webfont.woff') format('woff'), url('../font/frutiger-bolditalic-webfont.ttf') format('truetype'), url('../font/frutiger-bolditalic-webfont.svg#webfontR2tDy7QH') format('svg'), url('../font/frutiger-bolditalic-webfont.eot');
    }
    

    So there is only 1 src attribute and .eot is at the end of it, without question mark.

    What I tried before and didn't work:

    • putting .eot on a separate line (before or after the other src)
    • putting a question mark after .eot

提交回复
热议问题