背景图片不显示在Safari中 [英] Background image not showing in Safari
本文介绍了背景图片不显示在Safari中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在开发一个响应式设计,类bgMainpage有一个背景图片,但它不会显示在所有的设备上的Safari。我已经应用背景大小封面,因为它是客户想要的。我已经添加了浏览器特定的CSS,我不知道还有什么要做,以便它显示在Safari中。 Chrome,FF,IE显示图像很好。任何想法?
I am working on a responsive design and the class "bgMainpage" is having a background image but it is not showing on Safari on all the devices. I have applied background size cover as it is what the client wants. I have added browser specific CSS too and I am not sure what else to do so that it shows up in Safari too. Chrome, FF, IE show the image just fine. Any ideas ?
CSS:
.bgMainpage{
background:url("../images/bg.jpg") no-repeat scroll right top #000000;
-o-background-size: cover;
-moz-background-size: cover;
-webkit-background-size:cover;
background-size: cover;
}
推荐答案
jpeg到gif和它工作。所以最后的CSS是:
I converted the image format from jpeg to gif and it worked. So the final CSS is :
.bgMainpage{
background:url("../images/bg.gif") no-repeat scroll right top #000000;
-o-background-size: cover;
-moz-background-size: cover;
-webkit-background-size:cover;
background-size: cover;
}
这篇关于背景图片不显示在Safari中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文