jQuery Mobile背景图像未在全屏iPad Web应用程序上显示 [英] jQuery Mobile background image not showing on a full screen iPad web app

查看:108
本文介绍了jQuery Mobile背景图像未在全屏iPad Web应用程序上显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经像这样在data-role ="page"元素上设置了背景

I have set a background on the data-role="page" element like so

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

它在桌面浏览器和iPad Safari浏览器上都可以很好地工作.

It works perfectly fine on a desktop browser and on the iPad safari browser.

我遇到的问题是,当您将网站作为应用程序"添加到主屏幕时,它是一个全屏网络应用程序.它不显示背景...

The issue I am having is that when you add the website to the home screen as an 'app' and it is a full screen web app. It doesn't show the background...

我尝试通过样式表和内联设置它,并且两种方式都给我带来相同的问题.

I have tried setting it via a style sheet and inline and both ways give me the same issue.

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

I am completely out of ideas as to why this wouldn't work.

任何想法都将受到赞赏.

Any ideas are greatly appreciated.

推荐答案

最后,这对我有用.

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

无法通过css文件工作.

wouldn't work via a css file.

这篇关于jQuery Mobile背景图像未在全屏iPad Web应用程序上显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆