Ionic 2:从导航栏中的自定义组件按钮中删除背景
Ionic 2: Remove background from custom component button in navbar
问)如何修复下方自定义组件的样式,使其看起来像加号,继承了 <ion-buttons>
指令的样式?
我在我的导航栏中使用自定义组件:<notifications-bell></notifications-bell>
,像这样:
<ion-navbar *navbar header-colour>
<button menuToggle>
<ion-icon name="menu"></ion-icon>
</button>
<ion-buttons end>
<notifications-bell></notifications-bell>
<button>
<ion-icon name="add"></ion-icon>
</button>
</ion-buttons>
<ion-title>Clients</ion-title>
</ion-navbar>
但是它是用背景色渲染的:
这是我的组件:
import {Component} from 'angular2/core';
@Component({
selector: 'notifications-bell',
directives: [],
template: `<button><ion-icon name="notifications-outline"></ion-icon></button>`
})
export class NotificationsBellComponent {
constructor() {
}
}
谢谢。
我想这就像删除背景和阴影一样简单?
button{
background: none !important;
background-color: none !important;
box-shadow: none !important;
}
问)如何修复下方自定义组件的样式,使其看起来像加号,继承了 <ion-buttons>
指令的样式?
我在我的导航栏中使用自定义组件:<notifications-bell></notifications-bell>
,像这样:
<ion-navbar *navbar header-colour>
<button menuToggle>
<ion-icon name="menu"></ion-icon>
</button>
<ion-buttons end>
<notifications-bell></notifications-bell>
<button>
<ion-icon name="add"></ion-icon>
</button>
</ion-buttons>
<ion-title>Clients</ion-title>
</ion-navbar>
但是它是用背景色渲染的:
这是我的组件:
import {Component} from 'angular2/core';
@Component({
selector: 'notifications-bell',
directives: [],
template: `<button><ion-icon name="notifications-outline"></ion-icon></button>`
})
export class NotificationsBellComponent {
constructor() {
}
}
谢谢。
我想这就像删除背景和阴影一样简单?
button{
background: none !important;
background-color: none !important;
box-shadow: none !important;
}