2013-03-01 77 views
1

我需要一些關於啓動畫面的幫助。啓動畫面不起作用

該應用程序應該顯示一個登錄面板。我想從啓動(加載指示器)設置一個背景圖像,直到全屏顯示具有相同背景圖像的「登錄」面板。

我嘗試了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/[email protected]' 
},*/    
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', 

- >失敗

我需要幫助請。 在此先感謝

+0

您是通過直接放在主屏幕上還是從Safari上的圖標訪問您的應用程序?因爲啓動圖像只適用於前一種情況。 – 2013-03-03 15:51:01

+0

是的,從一個圖標..我正在研究xCode/iOS模擬器 – dream1 2013-03-03 15:58:42

回答

1

爲什麼不嘗試將圖像放入加載屏幕和第一個視圖(登錄頁面)的背景中?爲了把加載網頁上的圖像,你可以這樣改變appLoadingIndicator的CSS屬性index.html中:

#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; 
    } 

然後使用相同的圖像作爲背景登錄視圖。

+0

那麼定向呢?我想讓登錄視圖和啓動圖像應該退出登錄屏幕的背景。我如何釋放它? – dream1 2013-03-02 16:49:17

+0

我還沒有做,但使用CSS背景屬性,應該是可能的,因爲面板事實上是一個可以有背景圖像的div – ThinkFloyd 2013-03-03 05:27:38

+0

我們假設:當我們啓動應用程序,而不是白色屏幕和加載indiactor,你會看到背景然後它傳遞到登錄字段(使用與第一個相同的背景圖像),並且您希望單獨將登錄字段放在同一個面板中,讓我們在底部區域中說出兩個條目,一個用於用戶名(標籤和文本字段)和一些空格的第二個輸入密碼,在第一個在同一行(級別)和以上(登錄標題中的屏幕中間的TOP:右你會釋放它嗎?謝謝 – dream1 2013-03-03 10:35:15