hbuilder下沉浸式狀態欄設置

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

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

.mui-ios header{

padding-top: 8px !important;

}

.mui-android header{

padding-top: 10px !important;

}

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; background-color: #FFFFFF;">

其他

</div></div>


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章