Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/34.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
Html 使用多个实例和背景大小时Firefox背景图像闪烁_Html_Css_Firefox_Twitter Bootstrap - Fatal编程技术网

Html 使用多个实例和背景大小时Firefox背景图像闪烁

Html 使用多个实例和背景大小时Firefox背景图像闪烁,html,css,firefox,twitter-bootstrap,Html,Css,Firefox,Twitter Bootstrap,因此,我在一个页面上有几个元素共享背景图像。 我的页面使用引导,两个元素都是一个3列宽的容器。每个都有一个背景,并通过背景大小包含 在第二个元素中,我制作了90%宽度的背景,因此它比其他背景稍小 在Firefox中,这会导致第一个元素的背景不断闪烁。如果我改变CSS使两个背景大小相同,问题就会消失 它在Chrome和IE中运行良好,这只是Firefox的问题 这是一个bug吗,有没有人有过类似的经历 尝试为SVG切换图像,它会停止闪烁。然而,在我的例子中不可能使用SVG,因为背景图像中有大量垃圾

因此,我在一个页面上有几个元素共享背景图像。 我的页面使用引导,两个元素都是一个3列宽的容器。每个都有一个背景,并通过背景大小包含

在第二个元素中,我制作了90%宽度的背景,因此它比其他背景稍小

在Firefox中,这会导致第一个元素的背景不断闪烁。如果我改变CSS使两个背景大小相同,问题就会消失

它在Chrome和IE中运行良好,这只是Firefox的问题

这是一个bug吗,有没有人有过类似的经历

尝试为SVG切换图像,它会停止闪烁。然而,在我的例子中不可能使用SVG,因为背景图像中有大量垃圾,所以SVG就像2MB

以下是HTML和CSS的jist:

<section id="content-panel">
  <div class="container">
    <div class="row-fluid">
      <div id="thankyou-1" class="span3 bubble-bg-2">
      </div>
      <div id="thankyou-2" class="span3 bubble-bg-2">
      </div>
    </div>
  </div>
</section>
.bubble-bg-2 {
  background: url('/Content/Images/bg-bubble-2.png') no-repeat;
  background-size: contain;
}
#thankyou-1 {
  padding-top: 15px;
  text-align: center;
}
#thankyou-2 {
  background-position: center 25px;
  background-size: 90% auto;
  padding-top: 15px;
}

.bubble-bg-2{
背景:url('/Content/Images/bg-bubble-2.png')不重复;
背景尺寸:包含;
}
#谢谢你{
填充顶部:15px;
文本对齐:居中;
}
#谢谢你{
背景位置:中心25px;
背景尺寸:90%自动;
填充顶部:15px;
}

如果将背景大小声明从共享类中移出并设置为#Thankyu-1 id,会发生什么情况

.bubble-bg-2 {
  background: url('/Content/Images/bg-bubble-2.png') no-repeat;
}
#thankyou-1 {
  background-size: contain;
  padding-top: 15px;
  text-align: center;
}
#thankyou-2 {
  background-position: center 25px;
  background-size: 90% auto;
  padding-top: 15px;
}

Firefox的哪个版本?什么操作系统?在Win7上的FF 19.0和20.0中进行了测试。你能用小提琴复制你的问题吗?