启动图像不起作用

时间:2013-03-01 10:03:11

标签: html css extjs sencha-touch sencha-touch-2

我需要一些关于启动图像的帮助。

应用程序应显示登录面板。我想从启动(加载指示器)设置背景图像,直到登录面板出现全屏相同的背景图像。

我尝试了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;                
}

- &GT;问题是图像将在白屏和加载指示器后加载,我不知道如何设置它取决于方向(纵向,横向)

第二种方法:

我在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)" />

- &GT;没有成功

第三种方法:

    /*    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',    
},

- &GT;失败

最后一个:我尝试将此行添加到app.js

代码:

tabletStartupScreen:    'resources/startup/ios/Ipad_Landscape_748x1024.png',

- &GT;

失败了

我需要帮助。 在此先感谢

1 个答案:

答案 0 :(得分:1)

为什么不尝试将图像放在加载屏幕和第一个视图(登录页面)的背景中?要在加载页面上放置图像,您可以在index.html中更改appLoadingIndicator的CSS属性,如下所示:

    #appLoadingIndicator {
        margin: auto;
        text-align: center;
        width: 980px;
        height: 540px;
        background-image:url('resources/startup/ios/Ipad_Landscape_1024x748.png');
        -webkit-animation-name: appLoadingIndicator;
        -webkit-animation-duration: 3s;
        -webkit-animation-iteration-count: infinite;
        -webkit-animation-direction: linear;
    }

然后使用相同的图像作为登录视图的背景。

相关问题