Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/url/2.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
URL结构会破坏webfont吗?_Url_Font Face_Webfonts - Fatal编程技术网

URL结构会破坏webfont吗?

URL结构会破坏webfont吗?,url,font-face,webfonts,Url,Font Face,Webfonts,这两种结构之间有什么区别吗 使用http:// 没有http:// 如果是,请解释 另外:从我的测试来看,Chrome可以读取这些结构中的任何一种,但Firefox不能。没有http:的//表单称为a 如果将以//开头的链接添加到通过http获取的http页面或css文件中,字体将通过http获取,而如果将链接添加到https页面中,字体也将通过https自动获取。这是一个很好的答案-谢谢。我在周末发现了真正的问题。事实证明IE和Firefox支持跨域请求,而webkit则不支持。 @font-

这两种结构之间有什么区别吗

使用http://

没有http://

如果是,请解释

另外:从我的测试来看,Chrome可以读取这些结构中的任何一种,但Firefox不能。

没有http:的//表单称为a


如果将以//开头的链接添加到通过http获取的http页面或css文件中,字体将通过http获取,而如果将链接添加到https页面中,字体也将通过https自动获取。

这是一个很好的答案-谢谢。我在周末发现了真正的问题。事实证明IE和Firefox支持跨域请求,而webkit则不支持。
@font-face {
    font-family: 'nexa-boldregular';
    src: url('http://example.com/fonts/nexa_bold_webfont.eot');
    src: url('http://example.com/fonts/nexa_bold_webfont.eot?#iefix') format('embedded-opentype'), url('http://example.com/fonts//nexa_bold_webfont.woff') format('woff'), url('http://example.com/fonts//nexa_bold_webfont.ttf') format('truetype'), url('http://example.com/fonts//nexa_bold_webfont.svg#nexa_boldregular') format('svg');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'nexa-boldregular';
    src: url('//example.com/fonts/nexa_bold_webfont.eot');
    src: url('//example.com/fonts/nexa_bold_webfont.eot?#iefix') format('embedded-opentype'), url('//example.com/fonts//nexa_bold_webfont.woff') format('woff'), url('//example.com/fonts//nexa_bold_webfont.ttf') format('truetype'), url('//example.com/fonts//nexa_bold_webfont.svg#nexa_boldregular') format('svg');
    font-weight: normal;
    font-style: normal;
}