【发布时间】:2019-01-25 03:25:11
【问题描述】:
我想让我的标题背景颜色透明。我的 HTML 如下:
account.page.html
<ion-header>
<ion-toolbar>
<ion-buttons slot="start">
<ion-back-button defaultHref="home"></ion-back-button>
</ion-buttons>
<ion-title>Account</ion-title>
</ion-toolbar>
</ion-header>
account.page.scss
ion-header {
--ion-toolbar-background-color: rgba(0, 0, 0, 0);
}
这会使背景颜色变为白色,而不是透明。我还尝试通过 Chrome Inspector 为每个元素设置 background: transparent。但我只收到white。
任何帮助如何实现这一点?
【问题讨论】:
标签: css web-component css-variables ionic4