IE 11不正确处理字体声明 [英] IE 11 doesn't process font declaration correctly

查看:222
本文介绍了IE 11不正确处理字体声明的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下字体声明在 Internet Explorer 11

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

文本显示在 arial 中,而不是劳拉 Lora Google字体



然而,在 QupZilla Google Chrome

但是,当我将声明更改为

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

它在IE 11中正常工作。

什么可能是这个问题?




它变得更加奇怪:当我将网站保存为一个 *。html 文件到我的本地光盘,字体显示正确。 :

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


The following font declaration is not working in Internet Explorer 11.

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

The text is displayed in arial instead of Lora. Lora is a Google Font.

It's working however in Mozilla Firefox, QupZilla and Google Chrome.

But when I change the declaration to

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

it's working in IE 11.

What could be the problem?


It gets even stranger: When I save the website as an *.html file to my local disc, the font is displayed correctly. :-(

解决方案

Embed Google font on <head>.

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

and then try below css

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

这篇关于IE 11不正确处理字体声明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆