Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/15.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
Cordova为android设置背景图像_Android_Jquery Mobile_Cordova - Fatal编程技术网

Cordova为android设置背景图像

Cordova为android设置背景图像,android,jquery-mobile,cordova,Android,Jquery Mobile,Cordova,我正在使用cordova和jquery mobile开发android应用程序。如何在此应用程序中设置背景图像?我需要在所有页面中设置背景图像 这是我的代码..看,我只有一个html页面,下面的代码来自该html页面..它也代表一个页面..我在一个html页面中有6个这样的页面..我想在这6个页面中放置一个背景图像 <div data-role="page" id="home_page" data-content-theme="a" style="background-im

我正在使用cordova和jquery mobile开发android应用程序。如何在此应用程序中设置背景图像?我需要在所有页面中设置背景图像

这是我的代码..看,我只有一个html页面,下面的代码来自该html页面..它也代表一个页面..我在一个html页面中有6个这样的页面..我想在这6个页面中放置一个背景图像

      <div data-role="page"  id="home_page"  data-content-theme="a" style="background-image:url(images/back.jpg)" >  

      <div data-role="header"> 

     <div data-role="navbar"> 
      <ul>
       <li><a href="#about_us_page" id="products" data-transition="none">About</a></li>
       <li><a href="#purpose_page" id="projects" data-transition="none">Purpose</a></li>
       <li><a href="#design_page" id="awards" data-transition="none">Design</a></li>
     </ul>
     </div>

出口

内容内容


在这里,我已经在开始的div标签中给出了背景图像URl…但它不起作用…为什么


谢谢

将此CSS放在每页的顶部:

<style type="text/css">
body { background-image: url(path/to/your/img.jpg); }
</style>

body{background image:url(path/to/your/img.jpg);}
您还可以将CSS规则放入外部文件中,并在每个页面上链接它,如下所示:

<link rel="stylesheet" type="text/css" href="path/to/your/stylesheet.css" />

将此CSS放在每页的顶部:

<style type="text/css">
body { background-image: url(path/to/your/img.jpg); }
</style>

body{background image:url(path/to/your/img.jpg);}
您还可以将CSS规则放入外部文件中,并在每个页面上链接它,如下所示:

<link rel="stylesheet" type="text/css" href="path/to/your/stylesheet.css" />

要在JQM中设置背景图像,需要覆盖.ui-body-b,其中“b”是主题标识符

要在JQM中设置背景图像,需要覆盖.ui-body-b,其中“b”是主题标识符

.ui-body-b
{
background-image:url(../../images/wtpBackground.jpg);
background-repeat:no-repeat;
background-position:center;
height:10px;
width:10px;
}