Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/36.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css 没有一个IE版本加载我的字体文件_Css_Internet Explorer_Font Face - Fatal编程技术网

Css 没有一个IE版本加载我的字体文件

Css 没有一个IE版本加载我的字体文件,css,internet-explorer,font-face,Css,Internet Explorer,Font Face,我把下面的字体放在我的CSS中 @font-face { font-family: 'sfnt'; src: url('../sfnt.eot'); /* IE9 Compat Modes */ src: url('../sfnt.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */ url('../sfnt.woff') format('woff'), /* Modern Browsers */ url('../sfnt.ttf') f

我把下面的字体放在我的CSS中

@font-face {
font-family: 'sfnt';
src: url('../sfnt.eot'); /* IE9 Compat Modes */
src: url('../sfnt.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('../sfnt.woff') format('woff'), /* Modern Browsers */
url('../sfnt.ttf') format('truetype'); /* Safari, Android, iOS */
font-weight: normal;
font-style: normal;
}
如果我尝试在IE的任何版本中打开我的网页,它不会加载我的字体文件。 它可以与Chrome、safari和Firefox配合使用

我搜索了Stack Overflow中记录的类似问题,并尝试了所有可能的解决方案。似乎什么都不管用

请告诉我出了什么问题


如果您试图直接访问.eot字体的url,即http:///sfnt.eot 发生了什么事?

你可以尝试使用谷歌字体,更好的是兼容性,你可以使用谷歌cdn。如果找不到字体,可以尝试使用then的语法

@font-face {
  font-family: 'Wellfleet';
  font-style: normal;
  font-weight: 400;
  src: local('Wellfleet'), local('Wellfleet-Regular'), url(http://themes.googleusercontent.com/static/fonts/wellfleet/v1/qu15OBOh_Q0T8ooRUaKSDT8E0i7KZn-EPnyo3HZu7kw.woff) format('woff');
}
Google字体API与以下浏览器兼容:

    Google Chrome: version 4.249.4+
    Mozilla Firefox: version: 3.5+
    Apple Safari: version 3.1+
    Opera: version 10.5+
    Microsoft Internet Explorer: version 6+

via

您使用的是什么字体,从哪里获得的?是网络字体吗?@Jop是的,是网络字体。我曾经创建过我的网页字体。与CSS文件(或HTML,如果是内联的)目录相关的字体在哪里Residesh您是否检查了页面试图从中加载它们的目录是否与基于该页面的文件夹结构匹配?@Deryck所有我的字体都放在index.html所在的根目录中。这不是答案,这是一条注释。我只有48种声誉。我无法对此发表评论。