Internet Explorer 无法识别字体



我正在尝试在我的网页上定制社交媒体图标。我使用的是socicon字体。我的代码适用于除IE11之外的所有浏览器。我甚至试过了#ie修好了,但还是没用。我还读到,为了让IE11识别字体,我需要输入全名。我相信socicon是全名,但当我输入它时,它仍然不起作用。

这是我的代码:

@font-face {
    font-family: 'si';
    src: url('http://cdn2.hubspot.net/hub/181041/file-1984135345-eot/Font/socicon.eot');
    src: url('http://cdn2.hubspot.net/hub/181041/file-1984135345-eot/Font/socicon.eot?#iefix') format('embedded-opentype'),
          url('http://cdn2.hubspot.net/hub/181041/file-1984135350-woff/Font/socicon.woff') format('woff'),
          url('http://cdn2.hubspot.net/hub/181041/file-1981225289-ttf/Font/socicon.ttf') format('truetype'),
          url('h ttp://cdn2.hubspot.net/hub/181041/file-1979860473-svg/Font/socicon.svg') format('svg');
    font-weight: normal;
    font-style: normal;
}

同样奇怪的是,当我试图擦除这一行时:

src: url('http://cdn2.hubspot.net/hub/181041/file-1984135345-eot/Font/socicon.eot?#iefix') format('embedded-opentype'),

Safari也不再生产socicon字体。我认为Safari没有读取.eot文件。

谢谢,

Megan

如果你的IE高于8,那么我建议你将字体转换为.woff格式。我以前遇到过这个问题,这就是它的解决方案

将你的eot字体输入类似this的内容中,然后简单地将其转换为.woff。然后,再试一次。

edit:尝试使用本地字体

最新更新