2012-08-28 124 views
0

我在我的网站中使用了一种叫做samarn的字体。字体看起来不错火狐Google Chrome但在IE,它没有显示。@ font-face in ie not working

我的代码是:

@font-face { 
    font-family: 'SamarkanNormal'; 
    src: url('../fonts/samarn.eot'); 
    src: url('../fonts/samarn.eot?#iefix') format('embedded-opentype'), 
     url('../fonts/samarn.woff') format('woff'), 
     url('../fonts/samarn.ttf') format('truetype'), 
     url('../fonts/samarn.svg#samarn') format('svg'); 
    font-weight: normal; 
    font-style: normal; 
} 

#name { 
    font-family:'SamarkanNormal'; 
} 
+1

你有这个东东在网上托管的副本吗?你发布的代码看起来正确,从我可以告诉。 – jkinz

+0

网站链接是[链接](http://achieveee.com/pareekshum)。 – Pramod

+0

根据Adobe的BrowserLab,它似乎在IE9上正常工作。 (请参阅下面的链接)在IE8中,@ font-face被破坏了,但是整个布局也是如此。 https://browserlab.adobe.com/en-us/index.html#browsers=WXPIE9000%2CWXPCH18000%2CWXPIE8000%2CWXPIE7000;view=0;url=http%3A%2F%2Fachieveee.com%2Fpareekshum%2F;zoom= 100; state = use – depa

回答

2

尝试

@font-face { 
    font-family: 'font'; 
    src: url('font.eot'); 
    src: local('☺'), 
     url('font.otf') format('opentype'); 
} 

更多在这里:http://paulirish.com/2009/bulletproof-font-face-implementation-syntax/

可能与其他一些(比FSQ)字体面发生器,FE尝试。 http://fontface.codeandmore.com/

+0

我做到了,但没有工作。我的网站链接是http://achieveee.com/pareekshum。 – Pramod

+0

尝试通过此生成器转换您的字体http://fontface.codeandmore.com/ – Lukas

+0

其实我将我的.ttf字体转换为来自网站http://fontface.codeandmore.com/的其他字体。它提供的示例代码也不起作用即我不知道发生了什么问题。 – Pramod