2016-05-12 88 views
1

好日子,離子2構建與背景圖像

我使用離子版本2,當我運行離子發球局,我能看到我的登錄頁面上的應用程序的背景圖像和標識構建的移動應用程序。在構建應用程序時,我無法看到背景圖像和/或徽標。

<ion-row center style="margin-top: 50%;"> 
    <ion-col width-20></ion-col> 
    <ion-col width-60> 
     <img src="images/DD_logo.png" style="width:100%" class="thumbnail"/> 
    </ion-col> 
    <ion-col width-20></ion-col> 
</ion-row> 

這就是一個標誌是出現,這是從〜/應用程序/網頁/資料/ profile.html

+0

你是如何提供背景圖片到你的應用程序。請分享你的代碼。 – Atula

+0

Atula,謝謝你的迴應。請找到有問題的代碼片段。 – cookies

+0

我沒有看到任何代碼片段@cookies。 – Atula

回答

0

確定的部分可以試試看。這是ionic以及ionic 2中背景圖像的基本方法。
CSS

#Image { 
background: url(images/DD_logo.png) no-repeat center; 
width:100%; 
} 

HTML

<img id="Image" src="" class="thumbnail"/> 
+0

好吧指出。圖像顯示在離子服務器上,但是當爲設備編譯時(即,當創建apk時),圖像消失/從不顯示。 – cookies

+0

你是否也嘗試過上面的代碼? – Atula

+0

還提供給我.thumnail – Atula