Firefox和Linux中没有加载Twitter引导程序图标。 IE

时间:2013-05-14 12:35:57

标签: ruby-on-rails twitter-bootstrap icons sprite

在rails 3.2.9中,我使用的是twitter bootstrap插件,但是在Firefox中(包括Linux和Windows)& IE(在Windows中)图标未加载。在chrome&铬图标正在装载。

在Linux中,Firefox版本为20.0&在Windows中,IE版本是9& 10。

我的bootstrap_and_overrides.css.less文件包含,

@import "twitter/bootstrap/bootstrap";
@import "twitter/bootstrap/responsive";

// Set the correct sprite paths
@iconSpritePath: asset-path("twitter/bootstrap/glyphicons-halflings");
@iconWhiteSpritePath: asset-path("twitter/bootstrap/glyphicons-halflings-white");

// Set the Font Awesome (Font Awesome is default. You can disable by commenting below lines)
// Note: If you use asset_path() here, your compiled bootstrap_and_overrides.css will not
//       have the proper paths. So for now we use the absolute path.
@fontAwesomeEotPath: asset-path("fontawesome-webfont.eot");
@fontAwesomeEotPath_iefix: asset-path("fontawesome-webfont.eot#iefix");
@fontAwesomeWoffPath: asset-path("fontawesome-webfont.woff");
@fontAwesomeTtfPath: asset-path("fontawesome-webfont.ttf");
@fontAwesomeSvgPath: asset-path("fontawesome-webfont.svg");

// Font Awesome
@import "fontawesome";

// Glyphicons
//@import "twitter/bootstrap/sprites.less";

// Your custom LESS stylesheets goes here
//
// Since bootstrap was imported above you have access to its mixins which
// you may use and inherit here
//
// If you'd like to override bootstrap's own variables, you can do so here as well
// See http://twitter.github.com/bootstrap/customize.html#variables for their names and documentation

请帮我解决这个问题。

1 个答案:

答案 0 :(得分:0)

下载Glyphicons图像并将其放入资产文件夹,然后调用它。

  @iconSpritePath: asset-path("/assets/glyph-iconset.png");
  @iconWhiteSpritePath: asset-path("/assets/glyph-iconset-white.png");
  // Glyphicons    
  @import "twitter/bootstrap/sprites.less";