twitter-bootstrap 无法加载资源 glyphicons-halflings-regular.woff2

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/34603997/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-21 23:30:11  来源:igfitidea点击:

Falied to load resource glyphicons-halflings-regular.woff2

twitter-bootstraphttp-status-code-404glyphicons

提问by Jallipalli Phanindra

I am working with bootstrap in my website the icons are not displaying, In web console it is showing as

我在我的网站上使用引导程序,图标没有显示,在网络控制台中它显示为

Failed to load resource: the server responded with a status of 404 (Not Found)
http://mywebsite.in/lgm/assets/lib/bootstrap/fonts/glyphicons-halflings-regular.woff2

And the directory structure of the bootstrap is

bootstrap的目录结构是

  • assets
    • lib
      • bootstrap
        • css
        • fonts
        • js
  • 资产
      • 引导程序
        • css
        • 字体
        • js

Anyone help me regarding this issue

任何人都可以帮助我解决这个问题

Thanks in advance

提前致谢

回答by JobSam

The reason behind the error is because glyphicons-halflings-regular.woff2cannot be found on the path that is being looked for. This can be rectified by putting the file on folder. A fresh download of Bootstrap contains the file in the Fonts folder.

错误背后的原因是因为glyphicons-halflings-regular.woff2在正在寻找的路径上找不到。这可以通过将文件放在文件夹中来纠正。全新下载的 Bootstrap 包含 Fonts 文件夹中的文件。

回答by Michal_Szulc

There are few solutions:

有几个解决方案:

  • you can hard-remove these lines from your bootstrap.css file (if you do not using them)
  • you can upload missing fonts to specified path (/lgm/assets/lib/bootstrap/fonts/in this case)
  • you can generate your customized bootstrapjs/css without glyphicons
  • 您可以从 bootstrap.css 文件中硬删除这些行(如果您不使用它们)
  • 您可以将丢失的字体上传到指定路径(/lgm/assets/lib/bootstrap/fonts/在这种情况下)
  • 您可以没有字形的情况下生成自定义的 bootstrapjs/css