【问题标题】:IE8 emulation mode in IE11 breaks Google font PlayballIE11 中的 IE8 仿真模式破坏了 Google 字体 Playball
【发布时间】:2014-02-28 07:35:47
【问题描述】:

This Magento 1.4.1.1 website 需要这个标记:

<meta http-equiv="X-UA-Compatible" content="IE-EmulateIE8"></meta>

在 IE9 到 IE11 下工作(原型兼容性原因)。 使用 IE9 一切都很好(我无法使用 IE10 进行测试)。 但是在 IE11 中,主要在标题上使用的 google 字体 Playball 无法正确显示。 IE11 显示了另一种未知的(对我而言)字体。 这个问题与特定标记直接相关,因为如果我停用它,一切都会好起来的。我红了another post

Google 仅提供 .woff 格式的字体。 IE8 不支持 .woff,所以浏览器(像 IE8 一样)会忽略它。

目前我使用普通的 Google API 能够使用这种字体,包括:

<link href='http://fonts.googleapis.com/css?family=Playball' rel='stylesheet' type='text/css'/>

我的问题是:

  • 维护标记,是否有解决方法或其他方法在网站上包含字体,以便能够使用 IE11(当然还有其他浏览器)正确显示 google 字体?

【问题讨论】:

    标签: magento-1.4 internet-explorer-11 google-font-api x-ua-compatible


    【解决方案1】:

    我找到了一个有效的解决方法:

    如果您的服务器是 apache,您可以在网站根目录下的 .htaccess 文件中的 2 行中替换此指令:

    BrowserMatch MSIE best-standards-support
    Header set X-UA-Compatible IE=8 env=best-standards-support
    

    有了这个,我在 IE10 或 IE11 下使用谷歌字体不再有问题,甚至模拟 IE8。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-12-20
      • 1970-01-01
      相关资源
      最近更新 更多