【问题标题】:404 Not Found Glyphicons Bootstrap Work Around404 Not Found Glyphicons Bootstrap 解决方法
【发布时间】:2016-01-12 23:07:15
【问题描述】:

是否可以在不将此代码添加到 web.config 的情况下让引导 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>

很遗憾,我无法在工作场所添加此功能,但仍想使用引导程序中的分页。有没有其他方法可以解决这个问题?这些是我收到的错误。

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

【问题讨论】:

标签: css twitter-bootstrap iis


【解决方案1】:

即使找不到 glyphicons-halflings-regular.woff2 或 glyphicons-halflings-regular.woff,您也应该能够使用引导分页。

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

欲了解更多信息:Why should we include ttf, eot, woff, svg,... in a font-face

也许你的 html 有问题。

【讨论】:

    【解决方案2】:

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

    【讨论】:

      【解决方案3】:

      您也许可以:

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

      【讨论】:

        猜你喜欢
        • 2016-05-23
        • 2014-11-29
        • 1970-01-01
        • 1970-01-01
        • 2017-02-20
        • 1970-01-01
        • 2018-03-12
        • 2015-06-27
        • 2023-03-05
        相关资源
        最近更新 更多