答案 0 :(得分:4)
使用Ionic Native状态栏:
npm install @ionic-native/core --save
ionic cordova plugin add cordova-plugin-statusbar
npm install --save @ionic-native/status-bar
将插件添加到应用程序模块
` ...
import { StatusBar} from '@ionic-native/status-bar';
...
@NgModule({
...
providers: [
...
StatusBar
...
]
...
})
export class AppModule { }
`
然后在你的rootPage中使用它:
`
import { StatusBar } from '@ionic-native/status-bar';
constructor(private statusBar: StatusBar) { }
...
// let status bar overlay webview
this.statusBar.overlaysWebView(true);
// set status bar to white
this.statusBar.backgroundColorByHexString('#ffffff');
`
答案 1 :(得分:2)
.scss
.toolbar-background{
background-color:#7e6cfc;
}