0

我在我的网站上丢失了我的 Glyphicons,它们正被空盒子所取代。我已经看到了 Bootstrap 3 和 Glyphicons 的很多问题,但到目前为止我发现的修复都没有帮助我。我最近升级到 gem 'bootstrap-sass', '~> 3.1.0.0'。我认为我的语法是正确的。是否有可能需要更改的 Glyphicons 路径?

以下是我放置 Glyphicons 的三个地方:

<input type="text" class="form-control" placeholder="Search" name="search" id="search">
  <div class="input-group-btn">
    <button class="btn btn-default" type="submit"><i class="glyphicon glyphicon-search"></i></button>
  </div>


<%= link_to pin, method: :delete, data: { confirm: 'Are you sure?' } do %>
  <span class="glyphicon glyphicon-trash"></span>
          Delete
<% end %>


<%= link_to root_path do %>
    <span class="glyphicon glyphicon-home"></span>
<% end %>
4

2 回答 2

0

我不确定这是否是最好的做法,但我将其添加到我的 CSS 中:

@import url("//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-glyphicons.css")

他们回来了!

于 2014-02-01T16:53:47.330 回答
0

您也可以将其添加到您的 scss 文件中。

@import "bootstrap-sprockets";
于 2015-02-07T04:24:28.677 回答