Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/api/5.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 @本地IP上的字体仅在chrome中显示_Css_.htaccess_Cross Browser_Localhost_Font Face - Fatal编程技术网

Css @本地IP上的字体仅在chrome中显示

Css @本地IP上的字体仅在chrome中显示,css,.htaccess,cross-browser,localhost,font-face,Css,.htaccess,Cross Browser,Localhost,Font Face,我希望我的朋友能够查看我一直在使用Chrome(localhost/sitename/,或者现在是myIP/sitename/)在本地开发的WIP站点。我让它工作起来,意识到我的字体没有加载,然后检查了我电脑上的所有其他浏览器,发现了同样的事情 我已经完成了绝对路径,甚至尝试添加到.htaccess文件,但都没有效果。下面是我的代码。有什么建议吗?还没有活的 @font-face { font-family: 'arvo'; src: url('/arvo-regular-web

我希望我的朋友能够查看我一直在使用Chrome(localhost/sitename/,或者现在是myIP/sitename/)在本地开发的WIP站点。我让它工作起来,意识到我的字体没有加载,然后检查了我电脑上的所有其他浏览器,发现了同样的事情

我已经完成了绝对路径,甚至尝试添加到.htaccess文件,但都没有效果。下面是我的代码。有什么建议吗?还没有活的

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

您有什么本地服务器环境?类似于
/arvo regular webfont.eot
(前面有斜杠)的路径可能有效,也可能无效,根据你的设置。1)你的字体路径应该是相对于css文件而不是标记html文件的。你能检查一下吗2)同样在这个工具上如果你浏览字体,它会为你提供现成的zip路径和字体文件夹,你可以在本地主机上设置和调试issue@ralph.m-我在用WampServer@PravinVaichal我试过了“/wp content/themes/themes name/font/font name”而这一切都不起作用如果在dev tools中单击指向字体文件的链接会发生什么情况?路径是否正确?在本地服务器上,根文件可能不是您期望的位置。