简体   繁体   English

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

[英]Background image is not displayed properly only on Android browsers

I am trying to create my first responsive web site using bootstrap library on visual 2010.Background of my Login page is an image displayed in the hole page. 我正在尝试使用Visual 2010上的引导程序库创建我的第一个响应式网站。“登录”页面的背景是在漏洞页面中显示的图像。 That's why I have used viewPort to adjust it on mobile phones... <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/> It works fine on all browsers and IOS devices, but for Android devices it is not working properly. 这就是为什么我使用viewPort在手机上对其进行调整... <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>它在所有浏览器和IOS设备上均能正常工作,但对于Android设备,则无法正常工作。 There is a white space in the bottom of each Android screen. 每个Android屏幕的底部都有一个空格。 How can I remove this white space and display the image correctly on android browsers? 如何删除空白并在Android浏览器上正确显示图像? Attached are 2 screenshots from android and IOS devices. 随附的是来自Android和IOS设备的2个屏幕截图。

Update: Below is my css class of my body: 更新:以下是我的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 安卓系统

Try to add: 尝试添加:

html{
    height:100%;
    min-height:100%;
}
body{
    min-height:100%;
}

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

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