Bootstrap glyphicons(fonts / ****。woff)未加载

时间:2017-03-30 08:05:10

标签: node.js twitter-bootstrap apache google-chrome woff

我在尝试使用bootstrap glyphicons时在我的Google Chrome(56.0.2924.87)控制台中看起来像这样的错误

enter image description here

即使我的.woff文件和.ttf文件位于我的" public / css / fonts"文件夹中。

添加信息

我正在使用带有apache的Wampserver(2.4.23)

我使用" npm install bootstrap"

安装了bootstrap.css

这就是我的字体外观

@font-face {
  font-family: 'Glyphicons Halflings';
  font-style: italic;
  src: url('/public/css/fonts/glyphicons-halflings-regular.eot');
  src: url('/public/css/fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('/public/css/fonts/glyphicons-halflings-regular.woff2') format('woff2'), url('/public/css/fonts/glyphicons-halflings-regular.woff') format('woff'), url('/public/css/fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('/public/css/fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');

}

我尝试像这样调用glyphicons:

<i class="glyphicon glyphicon-chevron-left"></i>

有没有人知道这个问题可能在哪里?

1 个答案:

答案 0 :(得分:2)

仔细检查@ font-face位置路径以及mime类型。