简体   繁体   English

如何在phonegap中为iphone app设置背景图片

[英]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. 我是phonegap开发的新手,我正在开发一个使用phonegap框架的iphone应用项目。

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. 我正在设置http://www.wallpaperbase.com/wallpapers/computer/mac/mac_8.jpg图像作为我的iphone应用程序的背景,但它显示图像问题意味着图像无法正确显示在我的iphone设备上,如给定的图像示例下面。

Please solve my issue ASPS. 请解决我的问题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- 您需要在index.html页面的第15行尝试此操作 -


<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 只有在info.plist中进行了更改才能支持iPhone的横向模式

One important thing - take background image of size 320X480 or 640X940 (iPhone4) 一件重要的事情 - 拍摄尺寸为320X480或640X940(iPhone4)的背景图片

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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