Html 谷歌网络字体在 IE8 中不起作用

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/9050747/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-28 22:08:17  来源:igfitidea点击:

Google Web Fonts don't work in IE8

htmlcssinternet-explorer-8fontsgoogle-webfonts

提问by TIMEX

I'm using this to link to some Google Fonts:

我用它来链接到一些谷歌字体:

<link href='http://fonts.googleapis.com/css?family=IM+Fell+English+SC|Snippet|Sarina|Crushed|Caesar+Dressing|Montez|Bad+Script|Sofia|Fontdiner+Swanky|Just+Me+Again+Down+Here|Voltaire|Geo|Coming+Soon|Wellfleet|Passion+One|Rock+Salt|Homemade+Apple|Meddon|Rosario' rel='stylesheet' type='text/css'>

I'm using this code, which works in some browsers:

我正在使用此代码,它适用于某些浏览器:

<span style="font-size: 110px;font-family:montez;"><b>Abcdefg</b></span>

Why doesn't the font doesn't appear in IE8? http://jsfiddle.net/3NbE5/

为什么字体没有出现在 IE8 中?http://jsfiddle.net/3NbE5/

回答by Ricardo Casta?eda

It seems that IE doesn't support multiple fonts in the href:
http://jsfiddle.net/3NbE5/3/

似乎 IE 不支持 href 中的多种字体:http:
//jsfiddle.net/3NbE5/3/

You had this href:

你有这个href:

<link href='http://fonts.googleapis.com/css?family=IM+Fell+English+SC|Snippet|Sarina|Crushed|Caesar+Dressing|Montez|Bad+Script|Sofia|Fontdiner+Swanky|Just+Me+Again+Down+Here|Voltaire|Geo|Coming+Soon|Wellfleet|Passion+One|Rock+Salt|Homemade+Apple|Meddon|Rosario' rel='stylesheet' type='text/css'>


After removing the other fonts it worked:


删除其他字体后,它起作用了:

<link href='http://fonts.googleapis.com/css?family=IM+Fell+English+SC|Montez' rel='stylesheet' type='text/css'>

回答by golfadas

Just in case the solution above don't cut it for you.

以防万一上面的解决方案不适合您。

I got multiple fonts working on ie8 without any problems. My actual problem was using ie11 in compatibility mode for ie8, where google web fonts don't seem to work in any possible way.

我在 ie8 上使用了多种字体,没有任何问题。我的实际问题是在 ie8 的兼容模式下使用ie11,其中谷歌网络字体似乎无法以任何可能的方式工作。

I guess the lesson is, use a vm with the actual ie8. You can grab one hereor here.

我想教训是,将vm 与实际的 ie8 一起使用。你可以在这里这里抢一个。