jQuery Mobile background image not showing on a full screen iPad web app

China☆狼群 提交于 2019-12-04 14:47:21
Max Rose-Collins

In the end this is what worked for me.

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

wouldn't work via a css file.

Apply this to the element:

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

Try with this

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

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

In your CSS file:

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

Create a css class and end every attribute with !important to over-rule framework css. Thats why it is working inline only

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!