1
正如你在截图中看到的,我在下面看到了我的iPhone,该应用在页面底部有一堆空白。这只发生在手机上。我怎样才能让页面填满整个屏幕?如何让我的应用程序填充移动设备的全部高度?
CSS:
.landing-bg2 {
background: asset-url("startupstock1.jpg") no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
HTML:
<div class="landing-bg2 size">
.....contents of webpage
</div>
编辑!
我能使用以下命令:
.landing-bg2 {
background: asset-url("startupstock1.jpg") no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
min-height: 100%;
min-width: 1024px;
/* Set up proportionate scaling */
width: 100%;
height: auto;
/* Set up positioning */
position: fixed;
top: 0;
left: 0;
}
不过,我然后只限于一个BG,如果我想有另一个BG下面为您向下滚动,他们只是两个重叠,因为他们已经修复..所以仍然在寻找解决方案。
干杯@Cattla,如果我这样做的输入框出现了左边移动的某些原因。 – 2014-11-21 02:57:10
@SonnyBlack尝试将'padding:10px 5px 10px 5px'设置为类“.email-input2”。我认为输入框会出现在中心。对不起我的英语不好。 – Cattla 2014-11-21 03:08:25
这似乎工作,只有问题是它打破时,它下面添加另一个背景..我想知道其他网站如何做到这一点。啊不用担心..似乎大多数网站都有一个移动显示页面。 – 2014-11-21 03:14:41