如何使此Google字体在Internet Explorer 11上工作 [英] How to make this Google Font work on Internet Explorer 11

查看:313
本文介绍了如何使此Google字体在Internet Explorer 11上工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I use Montserrat font on my website, but it doesn't display on IE11 (windows 7). I put this other question some days ago: Montserrat font isn't displayed on IE 10 and 11

现在,我正在尝试通过css添加Montserrat google字体,但似乎不起作用.这是我的代码:

Now i am trying to add Montserrat google font throught the css but it doesn't seems to work. This is my code:

@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);

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

To call it inside your stylesheet and:

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

制作某种字体..

使用Google字体:注意:为使IE中最佳显示,请将样式表标签设为HTML部分中的第一个元素.在IE中,如果链接位于标签之后,则整个页面将被阻止,直到字体已加载."

From google fonts: "Note: For best display in IE, make the stylesheet tag the first element in the HTML section. In IE, if the link is placed after tags, the entire page will block and not display anything until the font is loaded."

<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

If that does not work, try this: https://developers.google.com/fonts/docs/webfont_loader#Example

这将使每个浏览器都像Firefox".

This will make every browser "behave like Firefox".

这篇关于如何使此Google字体在Internet Explorer 11上工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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