【问题标题】:Bootstrap theme having a Glyphicons issue in MeteorBootstrap 主题在 Meteor 中存在 Glyphicons 问题
【发布时间】:2016-02-19 23:59:28
【问题描述】:

首先我以推荐的方式使用bootswatch:readable 主题 - 在<head> 中链接到它。但是在我合并的自定义样式表并覆盖了应该覆盖 Bootstrap 的内容之后,Bootstrap 正在加载。

然后我尝试使用 meteor add bootswatch:readable 简单地安装它,它会工作,我的覆盖也可以工作,但问题是 Glyphicons - 我会得到

Failed to decode downloaded font:
http://localhost:3000/packages/bootswatch_readable/bootswatch/fonts/glyphicons-halflings-regular.woff2
OTS parsing error: invalid version tag
http://localhost:3000/packages/bootswatch_readable/bootswatch/fonts/glyphicons-halflings-regular.woff
OTS parsing error: invalid version tag
http://localhost:3000/packages/bootswatch_readable/bootswatch/fonts/glyphicons-halflings-regular.ttf
OTS parsing error: invalid version tag

我看到图标路径可能是错误的,但不确定在哪里或如何修复它。

【问题讨论】:

    标签: css twitter-bootstrap meteor glyphicons bootswatch


    【解决方案1】:

    找到了this issue on GitHub,它为我指明了一个临时解决方案。

    我使用meteor add bootswatch:readable 安装了主题并将其添加到我自己的样式表中:

    @font-face {
      font-family: 'Glyphicons Halflings';
      src: url('packages/bootswatch_readable/bootstrap/dist/fonts/glyphicons-halflings-regular.eot');
      src: url('packages/bootswatch_readable/bootstrap/dist/fonts/glyphicons-halflings-regular.eot?') format('embedded-opentype'),
        url('packages/bootswatch_readable/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2') format('woff2'),
        url('packages/bootswatch_readable/bootstrap/dist/fonts/glyphicons-halflings-regular.woff') format('woff'),
        url('packages/bootswatch_readable/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf') format('truetype'),
        url('packages/bootswatch_readable/bootstrap/dist/fonts/glyphicons-halflings-regular.svg') format('svg');
    }
    

    瞧,图标有效!

    【讨论】:

      猜你喜欢
      • 2013-10-05
      • 2014-03-14
      • 2013-06-12
      • 2019-12-12
      • 1970-01-01
      • 2014-09-05
      • 1970-01-01
      • 1970-01-01
      • 2014-06-26
      相关资源
      最近更新 更多