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

我在我的网站上使用蒙特塞拉特字体,但它不显示在IE11( Windows 7)上.我几天前提出这个问题: Montserrat font isn’t displayed on IE 10 and 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”.

相关文章

Css3如何实现鼠标移上变长特效?(图文+视频)
css3怎么实现鼠标悬停图片时缓慢变大效果?(图文+视频)
jquery如何实现点击网页回到顶部效果?(图文+视频)
css3边框阴影效果怎么做?(图文+视频)
css怎么实现圆角边框和圆形效果?(图文+视频教程)
Css3如何实现旋转移动动画特效