我正在为我的rails应用程序使用bootstrap 3在视图页中,没有显示引导图标。
我的文件夹结构看起来像。

 app/assets/stylesheets/bootstrap.min.css

 app/assets/fonts/  ###font files

 app/assets/images/  ###image files

在bootstrap.min.css中,我将字体系列称为
 @font-face{font-family:'Glyphicons Halflings';src:url('../fonts/glyphicons-halflings-regular.eot');src:url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'),url('../fonts/glyphicons-halflings-regular.woff') format('woff'),url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'),url('../fonts/glyphicons-halflings-regular.svg#glyphicons-halflingsregular') format('svg')}

如果我做错了,请纠正我。
更新:
显示图标的代码:
 <a title="edit" href="<%= edit_customer_customer_path(cust, from: "admin")%>">
 <i class="icon-pencil bigger-130"></i>
 </a>

最佳答案

Bootstrap 3使用不同的类作为图标,您使用的是用于Bootstrap 2的icon-*类在Bootstrap 3中,您应该使用.glyphicon.glyphicon-*CSS类:

<span class="glyphicon glyphicon-pencil"></span>

Migrating to v3.x

10-04 21:59