放大iPhone的背景图象

时间:2017-10-20 15:21:59

标签: ios css iphone

我到处寻找解决方案,但似乎无法解决问题。主要背景图片here在iPhone上大幅放大。这是我的背景图片代码:

.home-featured {
    background-image: url(/Roombg2.jpg);
    background-repeat: no-repeat;
    background-position: center center;
    background-attachment: scroll;
    background-color: #bbbbbb;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;

}

我不确定家庭功能的其他CSS是否会导致任何问题:

.home-featured .wrap {
    margin-top: -160px;
    max-width: 782px;
    display: table;
    text-align: center;
}

.home-featured .home-widgets-1 {
    display: inline-block;
    display: table-cell;
    vertical-align: middle;
    width: 100%;
    padding: 200px 0;
    font-size: 20px;
}

任何帮助都会非常感激 - 我完全迷失了!

1 个答案:

答案 0 :(得分:0)

您可能需要配置元视口标记。在iphone中,视口的行为略有不同。

请检查:Configuring the viewport