twitter-bootstrap - 资源解释为 Font 但使用 MIME 类型 text/html 传输 : "http://localhost:3000/fonts/glyphicons-halflings-regular.woff"

标签 twitter-bootstrap meteor twitter-bootstrap-3 meteorite

iam 使用 Meteor Framwork (PREVIEW 0.7.1.2),我已经使用 mrt 安装了 bootstrap-3,一切正常,但是从 chrome 的控制台我收到此警告:

Resource interpreted as Font but transferred with MIME type text/html: "http://localhost:3000/fonts/glyphicons-halflings-regular.woff"
Resource interpreted as Font but transferred with MIME type text/html: "http://localhost:3000/fonts/glyphicons-halflings-regular.ttf".
Resource interpreted as Font but transferred with MIME type text/html: "http://localhost:3000/fonts/glyphicons-halflings-regular.svg".

这非常烦人,特别是在为控制台开发时,

有人能解决这个问题吗? 谢谢

最佳答案

您的字体需要从 Meteor 应用程序中的公共(public)文件夹提供。为此,您可以在公共(public)文件夹内创建一个符号链接(symbolic link),指向 Bootstrap 安装中字体所在的位置。

编辑: 我下载了您正在使用的软件包并检查了字体文件夹的路径,使用下面的代码创建了字体的符号链接(symbolic link)。 注意这必须在项目的公共(public)目录中运行。

ln -s ../packages/bootstrap-3/fonts ./

关于twitter-bootstrap - 资源解释为 Font 但使用 MIME 类型 text/html 传输 : "http://localhost:3000/fonts/glyphicons-halflings-regular.woff",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22415879/

相关文章:

css - 我是响应式设计的新手,在针对不同分辨率进行设计时遇到问题

css - 如何移动交叉图像

android - 检测 meteor 应用程序的首次用户

html - Bootstrap 3 人像自定义样式 col-md

html - 如何激活侧边栏?

javascript - Twitter Bootstrap JS 警报上的自动关闭功能

javascript - 所见即所得编辑器不适合模态

reactjs - 当前用户的 Meteor 应用数据结构?

javascript - meteor 助手中未拾取 session 变量

javascript - 如何从这个动态表单中捕获数据