【问题标题】:Bootstrap glyphicon-menu-hamburger not showingBootstrap glyphicon-menu-hamburger 未显示
【发布时间】:2015-04-07 18:06:29
【问题描述】:

这里有明确定义的汉堡菜单引导图标:http://getbootstrap.com/components/#glyphicons-glyphs

如果我在我的 html 中使用它,这个图标不会显示,但其他图标是:

<button class="btn btn-default" type="button">
    <span class="glyphicon glyphicon-menu-hamburger" aria-hidden="true"></span>
</button>

这是为什么呢?

【问题讨论】:

    标签: css twitter-bootstrap icons glyphicons


    【解决方案1】:

    这是引导版本中的 glyphicon 版本的问题,因为它将始终更新,因此请使用相同的版本。你可以在这里查看http://getbootstrap.com/getting-started/。看起来它在 v3.3.2 中兼容并检查你的。

    其他可能性:

    1. 字体目录中缺少 glyphicons 字体c。
    2. 在目录路径中发现更改

    【讨论】:

    • 是的,我使用的是 3.2.0 版本而不是 3.3.2。但是,我使用了 font awesome 图标而不是 bootstrap,它看起来比 bootstrap 的模糊图标好多了。
    • 这是一个品味问题。我喜欢旧的:p
    【解决方案2】:

    Jean Gkol 说得有道理,因为看起来您的问题可能与您的 Bootstrap 版本有关。我在Bootply 测试了你的代码:

    <button class="btn btn-default" type="button">
        <span class="glyphicon glyphicon-menu-hamburger" aria-hidden="true"></span>
    </button>
    

    它适用于版本 3.3.2。但是,一旦我将版本更改为 3.3.1、3.3.0 或 3.2.0,字形图标就不会出现。所以看起来汉堡字形是 Bootstrap 组件包中一个相当新的图像。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-06-04
      • 2013-12-08
      • 2017-09-20
      • 2017-07-19
      • 1970-01-01
      • 2017-11-24
      • 2018-04-05
      • 1970-01-01
      相关资源
      最近更新 更多