2013-06-25 192 views
0

有没有人知道为什么下面的CSS无法在Safari上显示我的背景图片。请注意,这个CSS显示在其他浏览器我的背景图片:Safari上没有显示背景图片

.thGridColumnHeader 
{ 
    background-image: url('../Images/Textures/glass.png'); 
    background-image: none,-webkit-linear-gradient(top,rgba(255,255,255,.12) 0,rgba(255,255,255,.08) 50%,rgba(255,255,255,.05) 51%,rgba(255,255,255,.0) 100%); 
    background-image: none,-moz-linear-gradient(top,rgba(255,255,255,.12) 0,rgba(255,255,255,.08) 50%,rgba(255,255,255,.05) 51%,rgba(255,255,255,.0) 100%); 
    background-image: none,-o-linear-gradient(top,rgba(255,255,255,.12) 0,rgba(255,255,255,.08) 50%,rgba(255,255,255,.05) 51%,rgba(255,255,255,.0) 100%); 
    background-image: none,linear-gradient(to bottom,rgba(255,255,255,.12) 0,rgba(255,255,255,.08) 50%,rgba(255,255,255,.05) 51%,rgba(255,255,255,.0) 100%); 
    background-position: 50% 50%; 
    background-color: #1d1d1d; 
} 

下面是其他浏览器上

enter image description here

这里输出是在Safari

enter image description here

回答

2
输出

我刚刚通过在CSS类中进行以下调整来解决我的问题。

.thGridColumnHeader 
{ 
    background-image: none,-webkit-linear-gradient(top,rgba(255,255,255,.12) 0,rgba(255,255,255,.08) 50%,rgba(255,255,255,.05) 51%,rgba(255,255,255,.0) 100%); 
    background-image: none,-moz-linear-gradient(top,rgba(255,255,255,.12) 0,rgba(255,255,255,.08) 50%,rgba(255,255,255,.05) 51%,rgba(255,255,255,.0) 100%); 
    background-image: none,-o-linear-gradient(top,rgba(255,255,255,.12) 0,rgba(255,255,255,.08) 50%,rgba(255,255,255,.05) 51%,rgba(255,255,255,.0) 100%); 
    background-image: none,linear-gradient(to bottom,rgba(255,255,255,.12) 0,rgba(255,255,255,.08) 50%,rgba(255,255,255,.05) 51%,rgba(255,255,255,.0) 100%); 
    background-position: 50% 50%; 
    background-color: #1d1d1d; 
    background-image: url('../Images/Textures/glass.png'); 
} 

我已经将下面的代码转移到CSS类的最后部分,它的工作。

background-image: url('../Images/Textures/glass.png'); 

这里是输出现在野生动物园:

enter image description here

+1

你应该接受你的答案,如果你能 – vijrox

+0

@VijayRamamurthy它说我要等两天解决它。 –

+0

我已经找到解决方案谢谢你的answare,但我有其他问题,我以编程方式添加背景图像,所以我不能把“背景图像的CSS”放在底部,你知道如何解决它? –

2

我有同样的问题与Safari浏览器下的视差的背景图像。我加入的z-index样式

z-index:-1;