繁体   English   中英

如何使此Google字体在Internet Explorer 11上运行

[英]How to make this Google Font work on Internet Explorer 11

我在我的网站上使用蒙特塞拉特字体,但它不显示在IE11(Windows 7)上。 几天前我提出了另一个问题: IE 10和11上没有显示蒙特塞拉特字体

现在我想通过css添加蒙特塞拉特谷歌字体但它似乎不起作用。 这是我的代码:

@font-face {
    font-family: 'Montserrat';
    src: url('assets/fonts/montserrat-regular-webfont.eot');
    src: url('assets/fonts/montserrat-regular-webfont.eot?#iefix') format('embedded-opentype'),
         url('assets/fonts/montserrat-regular-webfont.woff2') format('woff2'),
         url('assets/fonts/montserrat-regular-webfont.woff') format('woff'),
         url('assets/fonts/montserrat-regular-webfont.ttf') format('truetype'),
         url('assets/fonts/montserrat-regular-webfont.svg#montserratregular') format('svg');
    font-weight: normal;
    font-style: normal;

}

使用:

@import url(http://fonts.googleapis.com/css?family=Montserrat:400,700);

要在样式表中调用它,并且:

font-family: 'Montserrat', sans-serif;

做一些字体..

来自谷歌字体:“注意:为了在IE中获得最佳显示效果,请将样式表标记设置为HTML部分中的第一个元素。在IE中,如果链接放在标记之后,整个页面将被阻止,并且在加载字体之前不显示任何内容“。

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

如果这不起作用,请尝试以下操作: https//developers.google.com/fonts/docs/webfont_loader#Example

这将使每个浏览器“表现得像Firefox”。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM