简体   繁体   English

在iPhone上放大背景图片

[英]Background image zooming in on iPhone

I've searched everywhere for a solution to this but can't seem to solve it. 我到处都在寻找解决方案,但似乎无法解决。 The main background image here zooms in massively on iPhone. 此处的主要背景图片在iPhone上大幅放大。 This is my background image code: 这是我的背景图片代码:

.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;

}

I'm not sure if other CSS for home-featured is causing any problems: 我不确定其他家用功能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;
}

Any help would be hugely appreciated - I'm completely lost on this! 任何帮助将不胜感激-我完全迷失了!

Probably you need to configure the meta viewport tag. 可能您需要配置meta视口标签。 In the iphone the viewport behaves a little different. 在iPhone中,视口的行为略有不同。

Check this: Configuring the viewport 请检查以下内容: 配置视口

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM