gpt4 book ai didi

css - Bootstrap 3 : Icons are not showing

转载 作者:太空宇宙 更新时间:2023-11-03 17:10:25 24 4
gpt4 key购买 nike

我正在为我的 Rails 应用程序使用 bootstrap 3。在 View 页面中, Bootstrap 图标未显示。

我的文件夹结构如下所示。

 app/assets/stylesheets/bootstrap.min.css

app/assets/fonts/ ###font files

app/assets/images/ ###image files

在 bootstrap.min.css 中我调用 font-family 如下

 @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 .

关于css - Bootstrap 3 : Icons are not showing,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26216210/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com