【问题标题】:IE 11 doesn't process font declaration correctlyIE 11 无法正确处理字体声明
【发布时间】:2014-03-06 15:15:02
【问题描述】:

以下字体声明在 Internet Explorer 11 中不起作用。

font:300 28px/1.1em 'Lora', arial, sans-serif;

文本显示为arial,而不是LoraLoraGoogle Font

但它在 Mozilla FirefoxQupZillaGoogle Chrome 中有效。

但是当我将声明更改为

font:300 28px/1.1em 'Lora';

它在 IE 11 中运行。

可能是什么问题?


它变得更奇怪了:当我将网站作为*.html 文件保存到我的本地磁盘时,字体显示正确。 :-(

【问题讨论】:

  • 清除缓存后问题是否仍然存在?如果是这样,你能发一个jsFiddle吗?
  • 那么页面什么时候工作?作为上传到服务器?在哪里?您如何使用由 Google 或其他方式托管的字体?
  • @MrLister 清除缓存没有帮助。
  • @JukkaK.Korpela 它确实在服务器上工作。该字体由谷歌托管。当我切换到 - 比如说 - Open Sans 时,一切正常。
  • 不可重现,用cs.tut.fi/~jkorpela/test/lorafont.html测试

标签: css internet-explorer fonts internet-explorer-11 google-font-api


【解决方案1】:

<head> 上嵌入 Google 字体。

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

然后在css下面试试

.class{
      font-family: 'Lora', Arial, sans-serif;
      font-weight:400;
      font-size:28px/1.1em;
    }

【讨论】:

    猜你喜欢
    • 2016-12-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-05-20
    • 1970-01-01
    • 2018-05-14
    • 1970-01-01
    相关资源
    最近更新 更多