【问题标题】:Weird glyphicon appearing and not rendering with bootstrap-select出现奇怪的字形图标,并且不使用引导选择进行渲染
【发布时间】:2014-08-17 23:33:20
【问题描述】:

我已经使用 bootstrap-select 实现了一个选择下拉列表,但由于某种原因,一些奇怪的字形图标无意中出现且未呈现,因此在此应用中每个电台名称后显示为正方形。

这是应用程序:http://radiant-taiga-9193.herokuapp.com/

以下是在每个站名后使用字形呈现的相关代码:

<i class="glyphicon glyphicon-ok icon-ok check-mark"></i>

这是我尝试修复失败的原因:

.glphicon, .glyphicon-ok, .icon-ok, .checkmark {
    visibility: hidden;
}

有什么建议吗?

【问题讨论】:

  • 请注意,Bootstrap 3 使用 span

标签: html css twitter-bootstrap bootstrap-select


【解决方案1】:

使用

.check-mark { display: none !important }

【讨论】:

    【解决方案2】:

    您没有正确加载字体文件。检查控制台,因为您收到字体的 404 错误。

    Failed to load resource: the server responded with a status of 404 (Not Found) http://radiant-taiga-9193.herokuapp.com/assets/twitter/fonts/glyphicons-halflings-regular.woff
    
    Failed to load resource: the server responded with a status of 404 (Not Found) http://radiant-taiga-9193.herokuapp.com/assets/twitter/fonts/glyphicons-halflings-regular.ttf
    
    Failed to load resource: the server responded with a status of 404 (Not Found) http://radiant-taiga-9193.herokuapp.com/assets/twitter/fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular
    

    【讨论】:

    • 奇怪。我的 gemfile 中有 twitter-bootstrap-rails。有什么原因可能无法加载吗?解决此问题的最佳方法是什么
    • 我从来没有用过 Heroku,所以我帮不了你。
    猜你喜欢
    • 1970-01-01
    • 2015-05-12
    • 1970-01-01
    • 1970-01-01
    • 2015-07-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多