Font Awesome无法加载资源/font/fontawesome-webfont.woff?v=3.0.1 [英] Font Awesome Failed to load resource /font/fontawesome-webfont.woff?v=3.0.1

查看:4942
本文介绍了Font Awesome无法加载资源/font/fontawesome-webfont.woff?v=3.0.1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

网站上的所有内容都看起来不错,但这两个错误都显示在控制台中。如果我点击字体下载。试图追踪一段时间,但在控制台中出现两个错误:


无法加载资源资源:/ font /fontawesome-webfont.woff?v=3.0.1

无法加载资源:/font/fontawesome-webfont.ttf?v = 3.0.1




我该如何摆脱这个错误?


解决方案

我最近遇到并解决了这个问题。解决的办法是添加'font'目录,以及任何其他需要处理资源的目录到你的adhoc包中,所以它最终在config.groovy中看起来像这样(如果你有其他资源的话需要添加目录)。

  grails.resources.adhoc.includes = ['/ images / **','/ css / **',' / js / **','/ font / **'] 

更多详情:
CSS文件中的URL被破坏Grails资源插件1.2.7


Everything looks fine on the site, but those two errors are showing up in the console. If I hit the url the font downloads. Been trying to track this down for a while, but I am getting two errors in the console:

Failed to load resource resource:/font/fontawesome-webfont.woff?v=3.0.1
Failed to load resource resource:/font/fontawesome-webfont.ttf?v=3.0.1

How can I get rid of this error?

解决方案

I recently encountered and solved this problem. The solution is to add the 'font' directory, and any other directories you want resources to be processed to your adhoc includes, so it ends up looking something like this in config.groovy (add directories as needed if you have resources elsewhere).

grails.resources.adhoc.includes = ['/images/**', '/css/**', '/js/**', '/font/**']

More detail here: URLs within CSS files broken with Grails resources plugin 1.2.7

这篇关于Font Awesome无法加载资源/font/fontawesome-webfont.woff?v=3.0.1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆