【问题标题】:Language picker with flag icon with Bootstrap带有 Bootstrap 标志图标的语言选择器
【发布时间】:2015-01-29 11:16:10
【问题描述】:

我会在这个部分放置一个语言选择器:

<section id="logo-section" class="text-center">
        <div class="container">
            <div class="row">
                <div class="col-md-12">
                    <div class="logo text-center">
                        <h1>Batpeppa</h1>
                        <span>Web Designer Trio</span>
                    </div>
                </div>
            </div>
        </div>
</section>

我会在“Web Designer Trio”副标题下插入两个标志图标。 我会使用 Bootstrap 3 中的 class="icon-flag"

我想我必须使用这样的东西:

<span class="icon-flag">

【问题讨论】:

  • 那么你的问题是什么?
  • 我不知道如何插入语言选择器。
  • 我的代码不起作用。未显示标志..

标签: javascript twitter-bootstrap twitter-bootstrap-3


【解决方案1】:

好吧,native Bootstrap 3.x icons 被命名为 glyphicon-&lt;name&gt;。所以在你的情况下:

<i class="glyphicon glyphicon-flag"></i>
<i class="glyphicon glyphicon-flag"></i>

Demo。您的代码不起作用,因为您指的是名为 icon-&lt;name&gt; 的“旧”Twitter Bootstrap 2.x icons。如果您想使用这些,您必须从here 下载并包含.png.css。那你应该没事。

【讨论】:

  • 太棒了!我只记得 Bootstrap 中的旧图标。
  • @sharkbait - 感谢您接受答案。我认为有很多人正在升级他们的引导程序并且对丢失图标等感到困惑。如果你问我,团队应该做出后备。
猜你喜欢
  • 1970-01-01
  • 2020-06-21
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2012-04-17
  • 1970-01-01
  • 1970-01-01
  • 2022-01-19
相关资源
最近更新 更多