Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/33.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css Twitter引导-图标_Css_Twitter Bootstrap - Fatal编程技术网

Css Twitter引导-图标

Css Twitter引导-图标,css,twitter-bootstrap,Css,Twitter Bootstrap,我正在使用AmazonS3 我的图标没有显示 我在脑海中添加了以下内容 <style> [class^="icon-"], [class*=" icon-"] { display: inline-block; width: 14px; height: 14px; margin-top: 1px; *margin-right: .3em; line-height: 14px; vertical-align: text-top; background-im

我正在使用AmazonS3

我的图标没有显示

我在脑海中添加了以下内容

<style>
[class^="icon-"],
[class*=" icon-"] {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-top: 1px;
  *margin-right: .3em;
  line-height: 14px;
  vertical-align: text-top;
  background-image: url("https://s3.amazonaws.com/BUCKET/img/glyphicons-halflings.png");
  background-position: 14px 14px;
  background-repeat: no-repeat;
}

</style>

[class^=“icon-”],
[类别*=“图标-”]{
显示:内联块;
宽度:14px;
高度:14px;
页边顶部:1px;
*右边距:.3em;
线高:14px;
垂直对齐:文本顶部;
背景图像:url(“https://s3.amazonaws.com/BUCKET/img/glyphicons-halflings.png");
背景位置:14px 14px;
背景重复:无重复;
}
我以为它会覆盖旧路径,但我仍然看不到图标


有什么想法吗?

每个精灵都有一个
背景位置
它所在的位置,你可以用这些样式覆盖它们。由于您只想更改精灵的源,请使用:

[class^="icon-"],
[class*=" icon-"] {
    background-image: url("https://s3.amazonaws.com/BUCKET/img/glyphicons-halflings.png");
}

我也有同样的问题——并且已经将问题缩小到使用生产CDN而不是测试的
.css

在heroku上,我将
RAILS_ENV
RACK_ENV
设置为测试,但是它仍然使用生产CDN编译CSS

其他资产显示正确的CDN,由于以下原因,似乎使用了Prod CDN:

@iconSpritePath: asset-path('twitter/bootstrap/glyphicons-halflings.png');

你有权公开访问该图像吗?我在拉取图像时遇到这个错误:XPath/RenderXSLAllAccessDisabled对这个对象的所有访问都被禁用了C67E5A43B8890C6D jBackG5hjmjnfT+NwR6YUsA/BXZDXBZQZSOUITYZW1RYHIYLPU/pKFIaE71eFgb是的,上面的链接只是一个例子。你的样式元素是在你引用引导css文件后定义的吗?是的,它是你头脑中最后一件事