我需要一些关于启动图像的帮助。
该应用程序应显示登录面板。我想从启动(加载指示器)设置背景图像,直到登录面板出现全屏相同的背景图像。
我尝试了 4 种方法,但没有成功第一种方法:我在 index.html 中设置了一个样式块:
<style type="text/css">
shtml, body {
height: 100%;
background-color:#FFFFFF;
background-image: url(resources/startup/ios/Ipad_Landscape_1024x748.png); background-position: center;
background-repeat: no-repeat;
}
-> 问题是图像将在白屏和加载指示器之后加载,我不知道如何根据方向(纵向,横向)设置它
第二种方法:
我在 index.html 中写了这个:
<!-- startup image for web apps - iPad - landscape (748x1024)
Note: iPad landscape startup image has to be exactly 748x1024 pixels
(portrait, with contents rotated).-->
<link rel="apple-touch-startup-image" href="resources/startup/ios/Ipad_Landscape_748x1024" media="screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:landscape)" />
<!-- startup image for web apps - iPad - portrait (768x1004) -->
<link rel="apple-touch-startup-image" href="resources/startup/ios/Ipad_Portrait_768x1004.png" media="screen and (min-device-width: 481px) and (max-device-width: 1024px) and (orientation:portrait)" />
<!-- startup image for web apps (320x460) -->
<link rel="apple-touch-startup-image" href="img/iphone.png" media="screen and (max-device-width: 320px)" />
--> 没有成功
第三种方法:
/* icon: {
'57': 'resources/icons/ios/Icon_phone.png',
'72': 'resources/icons/ios/Icon-72_Ipad.png',
'114': 'resources/icons/ios/Icon-114.png',
'144': 'resources/icons/ios/Icon-144_ipad@2x.png'
},*/
fullscreen: true,
glossOnIcon:true,
isIconPrecomposed: true,
startupImage: {
'768x1004': 'resources/startup/ios/Ipad_Portrait_768x1004.png',
'748x1024': 'resources/startup/ios/Ipad_Landscape_748x1024.png',
},
--> 失败
最后一个:我尝试将这一行添加到 app.js
代码:
tabletStartupScreen: 'resources/startup/ios/Ipad_Landscape_748x1024.png',
--> 失败
我需要帮助。提前致谢