HBuilder設置沉浸式狀態欄顯示效果

1:在【manifest.json】文件中,在【plus-->distribute--> apple】下加上【 "UIReserveStatusbarOffset":false】,在【google】下加上【"ImmersedStatusbar":true】css

2:配置完以後在引入的樣式css中加上android

ios

.mui-ios header{json

padding-top: 8px !important;app

}ui

.mui-android header{google

padding-top: 10px !important;orm

}input

io

3:安卓版本能夠,可是ios版本中,一旦又form表單帶有input元素,將會致使標題欄上的標題向上移動,破壞樣式,解決辦法是在表單外層,div=mui-content裏面在加上一層

<div class="mui-content" style="margin-top: 45px; padding: 0px;">

<div class="mui-content-padded" style="margin: 5px; ">

其餘

</div></div>

相關文章
相關標籤/搜索