gpt4 book ai didi

html - Internet Explorer 无法识别字体

转载 作者:太空宇宙 更新时间:2023-11-03 17:54:08 24 4
gpt4 key购买 nike

我正在尝试在我的网页上定制社交媒体图标。我正在使用 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 文件。

谢谢,

梅根

最佳答案

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

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

编辑:尝试使用本地字体

关于html - Internet Explorer 无法识别字体,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26676428/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com