字体文件无法加载,确认文件是存在的
发布于 5 年前 作者 phe 11192 次浏览 来自 问答

@font-face {

  font-family: ‘Glyphicons Halflings’;

  src: url(’/assets/fonts/glyphicons-halflings-regular.eot’);

  src: url(’/assets/fonts/glyphicons-halflings-regular.eot?#iefix’) format(‘embedded-opentype’), url(’/assets/fonts/glyphicons-halflings-regular.woff2’) format(‘woff2’), url(’/assets/fonts/glyphicons-halflings-regular.woff’) format(‘woff’), url(’/assets/fonts/glyphicons-halflings-regular.ttf’) format(‘truetype’), url(’/assets/fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular’) format(‘svg’);

}

控制台报错

VM884:2 Failed to load font http://1701630871.debug.open.weixin.qq.com/assets/fonts/glyphicons-halflings-regular.woff : the server responded with a status of 404 (HTTP/1.1 404 Not Found) 

From server 127.0.0.1

文件确实存在的,其他jpg/png图片文件都没问题

是bug,还是限制了这些文件类型?

7 回复

通过网络加载果然可以了。

request域名一个月设置三次,一下子用完了 -_-

请问各位大神,我字体使用网络地址之后,ios和模拟器上是可以正常显示了,但是安卓机器上缺不生效,这是为啥?

字体文件要放在网络上请求。

好的,谢谢两位,我试试看。

可以放到本地的。

我的字体也是在ios上有效,安卓真机上无效,请问是为什么?

无法加载本地的,需要用网络地址

回到顶部