ionic1隐藏导航栏,居中导航栏
2018-11-27 本文已影响0人
菠菜盼娣
有的时候我们的标题栏上会有两个按钮,如果运用不好会出现再其他机型上不居中的情况,或者当我们引用地图的话,为了地图的显示区域变大,会隐藏标题栏。
```
hide-nav-bar="true" 隐藏标题栏
<ion-view view-title="质量地图" hide-nav-bar="true"></ion-view>
ion-nav-title 标题 text-center 居中
<ion-nav-buttons side="left">
<span ng-click="openModal()">
<img src="img/backHome.png" alt="" >
</span>
</ion-nav-buttons>
<ion-nav-title text-center>
<div class="titleCenter">
<button ng-click="abnormalClick()">异常</button>
<button ng-click="reportClick()">报警</button>
</div>
</ion-nav-title>
<ion-nav-buttons side="right">
<button ng-click="openModals()">筛选</button>
</ion-nav-buttons>
ion-nav-title使用之后 会使按钮之间有间隙,添加text-center 即可解决。
```
希望能帮到有问题的小伙伴。