0

在 rails 3.2.9 中,我正在使用 twitter 引导插件,但在 Firefox(Linux 和 Windows 中)和 IE(Windows 中)图标未加载。在 chrome 和 chromium 中,图标加载正常。

在 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

请帮我解决这个问题。

4

1 回答 1

0

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

  @iconSpritePath: asset-path("/assets/glyph-iconset.png");
  @iconWhiteSpritePath: asset-path("/assets/glyph-iconset-white.png");
  // Glyphicons    
  @import "twitter/bootstrap/sprites.less";
于 2013-05-16T07:12:31.893 回答