ion-navbar背景图片不显示-仅显示白色-Ionic 3 [英] ion-navbar background image not appearing - showing only white - Ionic 3
本文介绍了ion-navbar背景图片不显示-仅显示白色-Ionic 3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个 ion-header
部分,如下所示:
I have an ion-header
section like this:
<ion-header (swipeRight)="toProfile()">
<ion-navbar #clickme class="itemadspace" [@slideDown]="downState" no-lines no-padding>
<h3 class="feedtitle">Stylist Feed</h3>
<div (tap)="loadPost()" class='pluscontainer'>
<ion-icon class='plussy' name="add"></ion-icon>
</div>
</ion-navbar>
...
</ion-header>
ion-navbar
的CSS是 itemadspace
类,是:
.itemadspace {
z-index: 1;
position: fixed;
top: 0;
left: 0;
background-image: url('../../assets/tresemme.png');
background-repeat: no-repeat;
background-size:cover;
text-align: center;
}
没有图像显示, ion-navbar
组件的背景为白色.知道如何使背景图片正常工作吗?
No image shows, the background for the ion-navbar
component is white. Any idea how to get the background image to work?
推荐答案
而不是添加s类.您可以覆盖主题.您可以在底部的variable.scss中添加此代码.
INstead of adding a s class. you can overwrite the theme. You can add this code in variable.scss at bottom.
ion-header{
ion-navbar{
div.toolbar-background{
background-image: url('../../assets/tresemme.png');
background-repeat: no-repeat;
background-size:cover;
text-align: center;
}
}
}
这篇关于ion-navbar背景图片不显示-仅显示白色-Ionic 3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文