如何更改Ionic 2中md和ws的后退按钮颜色?

时间:2017-04-02 10:39:16

标签: javascript ionic-framework sass ionic2

我能够设置后退按钮图标并使用app config删除文本但是如何设置图标的颜色? Ios选择了主要/次要颜色,但在Android和Windows中显示为黑色。

imports: [
IonicModule.forRoot(MyApp,{
  'backButtonText':'',
  'backButtonIcon':'arrow-back',
  'pageTransition':'ios'

},{}
)]

Difference between the back button colors in ios, md and ws

1 个答案:

答案 0 :(得分:2)

您需要在组件的 .scss文件中按照下面的说明进行操作。

.ws,
.md {
  .back-button {
            color: red;//what ever the color you like
        }
}

如果您需要全球,那么您必须按照以下所示进行操作。

注意:我不喜欢使用!important hack.But,不幸的是,没有它就没有用。

<强> app.scss

.md,
.wp {
    .back-button {
        color: red !important;//what ever the color you like
    }
}
相关问题