【发布时间】:2016-04-20 14:40:51
【问题描述】:
我无法让我的字形图标在我的 Rails 资产管道中工作。
在stylesheets/application.sass,我有...
@import "bootstrap-sprockets"
@import "bootstrap"
@import "glyphicons"
我正在使用 bootstrap-sass 和 sass-rails 宝石
在stylesheets/glyphicons.css,我有...
@font-face {
font-family: 'Glyphicons Halflings';
src: url(asset_path('glyphicons-halflings-regular.eot'));
src: url(asset_path('glyphicons-halflings-regular.eot?#iefix')) format('embedded-opentype'), url(asset_path('glyphicons-halflings-regular.woff')) format('woff'), url(asset_path('glyphicons-halflings-regular.ttf')) format('truetype'), url(asset_path('glyphicons-halflings-regular.svg#glyphicons_halflingsregular')) format('svg');
}
这很奇怪,因为这个(下)工作正常,给了我红色的危险按钮......
<a class="detete btn btn-danger" href="#">x</a>
...虽然这个(如下)不起作用,但没有给我灰色的默认按钮或星形图标...
<a class="btn" href="#"><i class="icon-star-empty"></i></a>
这就是为什么我说 Bootstrap 只为我“部分”工作。对此的任何帮助将不胜感激。
【问题讨论】:
标签: ruby-on-rails twitter-bootstrap glyphicons