css - IE 11 无法正确处理字体声明

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

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

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

文本显示为 arial 而不是 LoraLora 是一个 Google Font .

它在 Mozilla Firefox 中工作, QupZillaGoogle Chrome .

但是当我将声明更改为

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

它在 IE 11 中工作。

可能是什么问题?


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

最佳答案

<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;
    }

关于css - IE 11 无法正确处理字体声明,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21657744/

相关文章:

Internet Explorer 中的 CSS "unset"/"initial"

javascript - 如何获取html标签的字体大小

iphone - iPhone 应用程序中的字体使用版权

css - 创建响应式 drupal 7 幻灯片

html - 在 html 中而不是通过 css 将样式应用于 nav ul li

jquery - 浏览器中的用户可旋转元素

javascript - IE8 中未定义的 JQuery

css - 即 CSS : Link under transparent box is clickable

ios - 将我下载的字体设置为粗体

javascript - 制作一个真正像表格网格一样的停止(如何显示足够的空行来填充表格网格的高度)