【问题标题】:How to change the toolbar color in Ionic 4 with CSS如何使用 CSS 更改 Ionic 4 中的工具栏颜色
【发布时间】:2019-04-10 07:06:35
【问题描述】:

我想通过 ion-toolbar、ion-tab-bar 和 ion-tab-button 的 page.scss 改变背景颜色。

它适用于 ion-tab-bar 和 ion-tab-button 但不适用于 ion-toolbar。

有来自 page.scss 的代码:

ion-toolbar, ion-tab-bar, ion-tab-button {

    background-color: aquamarine;

}

感谢您的帮助

【问题讨论】:

标签: css ionic-framework ionic4


【解决方案1】:

他们在 Ionic 4 中使用 CSS 变量,尝试类似

ion-toolbar {
    --background: aquamarine;
    }

您可以在此处了解有关工具栏和其他组件的变量的更多信息: https://ionicframework.com/docs/api/toolbar

【讨论】:

    猜你喜欢
    • 2019-07-24
    • 1970-01-01
    • 1970-01-01
    • 2016-05-21
    • 1970-01-01
    • 1970-01-01
    • 2010-12-10
    • 2021-07-19
    • 2020-05-09
    相关资源
    最近更新 更多