简体   繁体   中英

How to set Background image for iphone app in phonegap

I am new in phonegap development and i am developing one project for iphone application with use of phonegap framework.

I am setting http://www.wallpaperbase.com/wallpapers/computer/mac/mac_8.jpg image as a background of my iphone application but its showing problem with image means image not properly displaying on my iphone Device like as given image example below.

Please solve my issue ASPS.

在此输入图像描述

Please check my code and let me know what's wrong in it.

You need to try this on line number 15 in index.html page-


<body style="background: url(mac_8.jpg) no-repeat;background-size: 100%;" >

then your app's background image will look like this -

景观模式肖像模式

only if you made changes in info.plist to support for landscape mode for iPhone

One important thing - take background image of size 320X480 or 640X940 (iPhone4)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM