让背景完全覆盖android手机
我的背景有一些问题,只是没有在android手机屏幕上正确加载。在苹果上效果很好。我用于背景的样式是:让背景完全覆盖android手机,android,html,css,wordpress,Android,Html,Css,Wordpress,我的背景有一些问题,只是没有在android手机屏幕上正确加载。在苹果上效果很好。我用于背景的样式是: body { background: url('images/MobileBack.png') no-repeat center center fixed; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-si
body
{
background: url('images/MobileBack.png') no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
您也可以在www.bingetech.com上查看该网站。我认为这可能是因为您尚未在视口元标记中定义比例 尝试:
你可能需要一个最大比例来添加用最大值更新的视图,看起来效果更好一些,但是当我在横向视图和垂直视图之间滚动或切换时,它不会正确地用最大值更新渲染?还是敏?在这种情况下,min比max更有益。您需要确保包围具有bg图像的容器的容器,以及将bg图像容器设置为
height:100%
的容器也设置为height:100%
<meta name="viewport" content="initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
html, body {
min-height: 100%;
}