Ruby on rails 4 Rails4-引导3我的图示符图标呈现为空框
我在我的网站上丢失了我的图标,它们正在被空框替换。我已经看到了很多关于引导3和Glyphicons的问题,但是到目前为止,我发现没有一个修复对我有帮助。我最近升级到了gem的bootstrap sass,“~>3.1.0.0”。我认为我的语法是正确的。是否有需要更改的图标路径 以下是我放置图标的三个位置:Ruby on rails 4 Rails4-引导3我的图示符图标呈现为空框,ruby-on-rails-4,twitter-bootstrap-3,glyphicons,Ruby On Rails 4,Twitter Bootstrap 3,Glyphicons,我在我的网站上丢失了我的图标,它们正在被空框替换。我已经看到了很多关于引导3和Glyphicons的问题,但是到目前为止,我发现没有一个修复对我有帮助。我最近升级到了gem的bootstrap sass,“~>3.1.0.0”。我认为我的语法是正确的。是否有需要更改的图标路径 以下是我放置图标的三个位置: <input type="text" class="form-control" placeholder="Search" name="search" id="search">
<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 %>
删除
我不确定这是否是最好的做法,但我在CSS中添加了以下内容:
@import url("//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-glyphicons.css")
他们回来了 您也可以将其添加到scss文件中
@import "bootstrap-sprockets";
一路上我试过了,但没用。希望它能帮助其他人!谢谢