IE 11 doesn't process font declaration correct

2019-07-12 19:51发布

问题:

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