2016-05-12 83 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