Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/30.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angular 角离子型变化_Angular_Ionic Framework - Fatal编程技术网

Angular 角离子型变化

Angular 角离子型变化,angular,ionic-framework,Angular,Ionic Framework,我正在开发爱奥尼亚移动应用程序。当我在scss中编写下面的代码时 ion-content{ background: rgba(15, 19, 31, 0.94) no-repeat;; width: 100%; height: 100%; display: table; } 我无法更改项目的背景。因为下面的代码阻止了它。我找不到它写在哪里 :host { --background: var(--ion-background-color,#fff);

我正在开发爱奥尼亚移动应用程序。当我在scss中编写下面的代码时

ion-content{
     background: rgba(15, 19, 31, 0.94) no-repeat;;
    width: 100%;
    height: 100%;
    display: table;
} 
我无法更改项目的背景。因为下面的代码阻止了它。我找不到它写在哪里

:host {
    --background: var(--ion-background-color,#fff);
    --color: var(--ion-text-color,#000);
    --padding-top: 0px;
    --padding-bottom: 0px;
    --padding-start: 0px;
    --padding-end: 0px;
    --keyboard-offset: 0px;
    --offset-top: 0px;
    --offset-bottom: 0px;
    --overflow: auto;
    display: block;
    position: relative;
    -ms-flex: 1;
    flex: 1;
    width: 100%;
    height: 100%;
    margin: 0!important;
    padding: 0!important;
    font-family: var(--ion-font-family,inherit);
    contain: layout size style;
}
我怎样才能改变ion-content的背景。有一种方法可以在它里面写div并赋予它风格。但我不想这么做。我想给样式直接的项目

提前感谢。

请使用

ion-content{
     --background: rgba(15, 19, 31, 0.94) no-repeat;
}
只用

ion-content{
     --background: rgba(15, 19, 31, 0.94) no-repeat;
}