404未找到Glyphicons Bootstrap解决方法

时间:2015-10-14 18:03:42

标签: css twitter-bootstrap iis

是否可以在不将此代码添加到web.config的情况下使bootstrap glyphicons正常工作?

<system.webServer>
    <staticContent>
      <remove fileExtension=".woff" />
      <remove fileExtension=".woff2" />
      <mimeMap fileExtension=".woff" mimeType="application/font-woff" />
      <mimeMap fileExtension=".woff2" mimeType="application/font-woff" />
    </staticContent>
  </system.webServer>

不幸的是我无法在我的工作场所添加它,但仍然希望使用bootstrap的分页。还有其他方法吗?这些是我收到的错误。enter image description here

也许以某种方式直接下载图像并更改bootstrap css以找到正确的图像?我所需要的只是目前的分页。有什么想法吗?

3 个答案:

答案 0 :(得分:3)

尝试转到文件的地址并从那里修复它。如果它不存在那么只需使用CDN:Bootstrap CDN | MaxCDN

答案 1 :(得分:2)

您可以:

  • 使用托管在CDN上的引导程序
  • 构建或修改引导程序并删除woff字体
  • 两者的组合,修改您自己的Bootstrap以使用CDN中的woff文件
  • 重写Bootstrap的glyphicon部分以使用图像(可能是最糟糕的想法,但它会起作用)。

答案 2 :(得分:1)

即使没有找到glyphicons-halflings-regular.woff2或glyphicons-halflings-regular.woff,你也应该可以使用bootstrap分页。

Bootstrap默认带有glyphicons-halflings-regular.ttf。浏览器将使用它将找到的第一个兼容字体文件,并且ttf得到很好的支持。

有关详细信息:Why should we include ttf, eot, woff, svg,... in a font-face

你的HTML可能有问题。