【问题标题】:Styling Buttons Alert - Ionic3样式按钮警报 - Ionic3
【发布时间】:2018-03-02 10:12:57
【问题描述】:

谁能帮我在 android 平台上设置警报框和按钮的样式,就像在 Ios 中一样?就像下图一样?

喜欢

我可以通过以下 css 属性更改颜色。

.buttonCss { 
button.alert-button:nth-child(1){
  color: #37474f !important;
}

button.alert-button:nth-child(2){
  color:#1565c0 !important;
}
}

请帮帮我。

【问题讨论】:

    标签: ionic2 ionic3


    【解决方案1】:

    您可以使用setMode 函数轻松做到这一点:

    let alert = this.alertCtrl.create(...);
    alert.setMode('ios');
    

    【讨论】:

    • 很棒的兄弟,它的工作。但不知道为什么有人反对这个答案。
    猜你喜欢
    • 2011-02-01
    • 1970-01-01
    • 1970-01-01
    • 2022-11-19
    • 2020-12-30
    • 2018-02-05
    • 1970-01-01
    • 1970-01-01
    • 2016-11-21
    相关资源
    最近更新 更多