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/