gpt4 book ai didi

node.js - Bootstrap 字形(fonts/****.woff)未加载

转载 作者:太空宇宙 更新时间:2023-11-03 23:26:46 25 4
gpt4 key购买 nike

尝试使用 bootstrap glyphicons 时,我在 Google chrome(56.0.2924.87) 控制台中出现如下错误

enter image description here

即使我的“public/css/fonts”文件夹中有 .woff 文件和 .ttf 文件。

其他信息

我正在使用 Wampserver 和 apache(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');

}

我尝试像这样调用字形:

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

有谁知道这个问题可能出在哪里吗?

最佳答案

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

关于node.js - Bootstrap 字形(fonts/****.woff)未加载,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43111943/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com