仅在Android浏览器上无法正确显示背景图像

时间:2017-04-13 10:00:33

标签: android html css twitter-bootstrap viewport

我正在尝试使用visual 2010上的bootstrap库创建我的第一个响应式网站。我的登录页面的背景是在孔页面中显示的图像。这就是我使用viewPort在手机上调整它的原因...... <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>它适用于所有浏览器和IOS设备,但对于Android设备,它无法正常工作。每个Android屏幕底部都有一个空白区域。如何删除此空白区域并在Android浏览器上正确显示图像?附件是来自android和IOS设备的2个截图。

更新 下面是我身体的css课程:

.imgBack { 
   background: url(images/bg.jpg) no-repeat center center fixed; 
   -webkit-background-size: cover; 
   -moz-background-size: cover; 
   -o-background-size: cover; 
    background-size: cover; 
}

IOS Android

1 个答案:

答案 0 :(得分:1)

尝试添加:

html{
    height:100%;
    min-height:100%;
}
body{
    min-height:100%;
}
相关问题