English 中文(简体)
jjury 移动背景图像, 未在完整屏幕 iPad 网络应用程序中显示
原标题:jQuery Mobile background image not showing on a full screen iPad web app

我已经设置了数据作用=“页面”元素的背景, 像这样

<div data-role="page" style="background: transparent url( img/background.jpg ) no-repeat;" >

它在桌面浏览器和iPad Safari浏览器上运作得非常好。

我的问题是,当你把网站添加到主屏幕上作为应用程序时, 它是一个完整的屏幕网络应用程序。 它没有显示背景...

我尝试通过样式表和内线 来设置它, 两种方式都给了我同样的问题。

我完全不知道为什么这样行不通。

任何想法都十分感激。

最佳回答

归根结底,这就是为我工作的原因。

<div data-role="page" id="home" style="background: #000000 
    url( img/background.jpg ) repeat;">

不会通过 css 文件工作 。

问题回答

将此应用到元素 :

.#target-element {
    background : transparent url(YOUR_URL) 0 0 no-repeat fixed !important;
    background-size : cover;
}​

试试这个

<style type="text/css">
.ui-page 
{

    background-image: url("img1.jpg");
    background-attachment:fixed;
    background-repeat: no-repeat;
    background-size: 100%;
}
</style>

在您的 CSS 文件 :

[data-role=page] {
    background: transparent url( img/background.jpg ) no-repeat;
}

创建 cs 类, 以 < code> 来结束每个属性 。 重要的 将 < codes > 设置为 cs 的超规则框架 cs 。 这就是为什么它只使用内线





相关问题
Export to pdf on the client or server side?

My client side application is using jqgrid that requests the server side, which in its turn queries MySQL and sends back the resultSet in XML format. I m willing to add the export to PDF ...

Image generator

I d like to be able to generate an image with overlaying text (that is inputted by the user) such as how it is done on www.depressiondog.info. Can someone show/link me to some code that will do that. ...

Where should I put this configuration setting?

I m designing a fairly small web application which will run on a Sun application server (v9.1). It only has a few pages, no database of its own, and will retrieve/update data via web services. There s ...

服务器面与用户对用户的MVC在网络信号中

我最近找到了一种与《伙伴关系协定》有关的有趣的替代办法。 NET MVC,我目前做的是:静态超文本,配有先进的 Java本式服务电话(大多数例子使用开放式雷达)。 例如,见此或......。

MySQL Users and All Privileges

Ok, I m trying to add a user to a MySQL database. This user should be able to add other users to the database it has privileges for. So I did this: GRANT ALL privileges ON thedbname.* TO topuser @ % ...

Doesn t get into Debug Mode

When I Press F5 on my VS2005 to debug the application, it launches the web app window but it is coming out of debug mode. When I tried to trace the Error in the EventViewer, this was the error: ...

热门标签