Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/77.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/39.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 位置:修复了ICS(本机浏览器)中背景图像不可用的问题_Html_Css_Jquery Mobile - Fatal编程技术网

Html 位置:修复了ICS(本机浏览器)中背景图像不可用的问题

Html 位置:修复了ICS(本机浏览器)中背景图像不可用的问题,html,css,jquery-mobile,Html,Css,Jquery Mobile,我有一个基于jQM的移动web应用程序。我有一个应用了以下样式的背景图像: body.ui-mobile-viewport .ui-page { background: url('images/bg-texture.jpg') no-repeat fixed left bottom; -webkit-background-size: 100% 100%; -moz-background-size: 100% 100%; -o-background-size: 10

我有一个基于jQM的移动web应用程序。我有一个应用了以下样式的背景图像:

body.ui-mobile-viewport .ui-page
{
    background: url('images/bg-texture.jpg') no-repeat fixed left bottom;
    -webkit-background-size: 100% 100%;
    -moz-background-size: 100% 100%;
    -o-background-size: 100% 100%;
     background-size: cover;
}
问题是,这在iOS、Android的Chrome上运行良好,但在ICS原生浏览器和Dolphin浏览器上,滚动开始后,背景会像这样贴在页面顶部:

在一些动作之后(比如轻敲一个元素),背景会像这样回到焦点:

我在网上查了一下,做了广泛的研究,但显然我遗漏了一些东西。以下是我尝试过的解决方案的链接:

您在顶部看到的(我指的是CSS)是应用的默认未编辑样式

注意: 我也试过了,它适用于姜饼设备,当页面内容是静态的时候。 在ICS设备上,如果将其应用于具有动态内容的页面,我将无法滚动到视口之外。 当我尝试在页面主体中创建
img
标记,并将
src
设置为图像所在的路径时,也会出现同样的问题

这些问题仅在本机浏览器中出现

如果我做错了什么,请告诉我。有没有一个纯CSS解决方案?(显然有些地方出了大问题)

试试这个:

body.ui-mobile-viewport .ui-page
{
 background: url('images/bg-texture.jpg') no-repeat fixed left bottom; 
 background-size: cover;
}
以下用于“html”的CSS解决了我在Android设备上的整页背景图像问题:

html{
    height:100%;
    width:100%
}

body{
    background-image:url(img/background.jpg);
    background-repeat:no-repeat;
    background-attachment:fixed;
    webkit-background-size:cover;
    -moz-background-size:cover;
    -o-background-size:cover;
    background-size:cover;
    }

希望有帮助。

这不起作用。这基本上就是问题所在,对吗?还是我遗漏了什么?