Ionic 4 透明离子含量

sel*_*lim 1 css sass ionic-framework ionic4

我有一个 Ionic 4 应用程序,我想要一个透明的内容。

这不起作用,并且内容始终为白色。我也将其添加到 css 中:

ion-content{
  --ion-background-color: transparent;
}
Run Code Online (Sandbox Code Playgroud)

在此处输入图片说明

Ira*_* JW 8

离子内容背景设置为--backgroundscss 变量 https://ionicframework.com/docs/api/content

ion-content { --background: transparent;}