Javascript 为移动浏览器设置全尺寸背景图像的替代方法

Javascript 为移动浏览器设置全尺寸背景图像的替代方法,javascript,html,css,mobile,Javascript,Html,Css,Mobile,我正在为移动网站进行媒体查询,我正在尝试将背景设置为图像: body { background: url("../images/back1.jpg") no-repeat center center fixed; webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; } 这对手机不起作用。据我所知,我不能在手机浏览器上使用fix

我正在为移动网站进行媒体查询,我正在尝试将背景设置为图像:

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

这对手机不起作用。据我所知,我不能在手机浏览器上使用fixed。我的问题是,还有什么其他方法可以在不拉伸背景图像或使其模糊的情况下制作背景图像。感谢您抽出时间来尝试为身体添加子容器

正文{
位置:相对位置;
最小高度:700px;
}
身体科{
位置:固定;
左:0;
右:0;
底部:0;
排名:0;
背景:url(“https://placehold.it/480x720)无重复中心;
webkit背景尺寸:封面;
-moz背景尺寸:封面;
-o-背景尺寸:封面;
背景尺寸:封面;
}

听起来核心问题是您没有这个元标记:

<meta name="viewport" content="width=device-width, initial-scale=1">

这将在移动浏览器中启用“响应性”。

您所说的“移动浏览器”是什么意思?有很多。