iphone上的背景图像无法正常显示

时间:2013-04-17 22:33:44

标签: iphone css background

我有一个背景图像,它应该在计算机上显示,但由于某种原因,它会变得太小(比如在我的iphone上查看时应该是它的一半)。有些事情导致这种情况发生在我一直在这个页面上工作,因为今天早些时候情况并非如此。

这是包含bg img的div的css。关于最新情况的任何想法?

#wrapper{
    position:relative;
    width:1000px;
    height:5854px;
    background-image:url(../images/UnearthingBG.jpg);
    background-color:#000;
    margin-top: 75px;
    margin-right: auto;
    margin-bottom: 0px;
    margin-left: auto;
    background-repeat: no-repeat;
    }

这是工作页面http://www.unearthingfilm.com/Test.html

3 个答案:

答案 0 :(得分:1)

我昨晚使用background-size: cover.

设法解决了这个问题

感谢您的回答。非常感谢

答案 1 :(得分:0)

我刚刚在iPhone上测试了您的网站,背景图片看起来很好看。我添加了截图打击。您的iPhone可能出现错误并在某处缓存文件。

我建议可以尝试转到 *设置 - > Safari - >清除Cookie和数据*

enter image description here

答案 2 :(得分:0)

我通过设置background-size

让我在iPhone 3GS上工作
#wrapper {
    -webkit-background-size: 1000px 5854px;
}

这很hacky,但在这里完成了工作。我应该告诉我,我的iPhone只是为了玩数独而且多年没有得到任何更新,所以它运行iOS 3.;)

原因可能是:http://medialab.zendesk.com/entries/22472177-Large-image-as-browser-background-not-working-on-iPhone-Safari-browser

  

您的问题是由手机游戏引起的。它只会缩小所有大于2Mpx的图像。

不知道这是否属实,但这是有道理的。

相关问题