【问题标题】:Falied to load resource glyphicons-halflings-regular.woff2无法加载资源 glyphicons-halflings-regular.woff2
【发布时间】:2016-04-08 19:46:33
【问题描述】:

我正在我的网站中使用引导程序,但图标未显示,在 Web 控制台中显示为

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

而bootstrap的目录结构是

  • 资产
      • 引导程序
        • CSS
        • 字体
        • js

谁能帮我解决这个问题

提前致谢

【问题讨论】:

  • 用这个字体 glyphicons-halflings-regular.woff2 检查 bootstrap.css 文件,它在哪里,或者请提供那里写的内容
  • @font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regulard41d.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff2) format('woff2'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')} in bootstarp.min.css 我有关于 glyphicons-halflings-regular.woff2 的代码
  • 你能上传一些代码让我检查一下吗
  • 感谢回复Paresh Gami一位同事解决了这个问题。
  • @Jallipalli Phinindra 你能告诉我你是如何解决这个问题的吗?我的文件夹中有字体,路径正确但仍然出现错误。

标签: twitter-bootstrap http-status-code-404 glyphicons


【解决方案1】:

解决办法很少:

  • 您可以从 bootstrap.css 文件中硬删除这些行(如果您不使用它们)
  • 您可以将丢失的字体上传到指定路径(本例中为/lgm/assets/lib/bootstrap/fonts/
  • 你可以generate your customized bootstrapjs/css 没有字形图标

【讨论】:

    【解决方案2】:

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

    【讨论】:

      猜你喜欢
      • 2015-07-29
      • 2015-12-14
      • 2016-11-20
      • 1970-01-01
      • 2018-03-12
      • 2015-11-24
      • 2019-01-29
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多