IE 11 doesn't process font declaration correctly

 ̄綄美尐妖づ 提交于 2019-12-12 20:27:28

问题


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. :-(


回答1:


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


来源:https://stackoverflow.com/questions/21657744/ie-11-doesnt-process-font-declaration-correctly

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!