ionic1 隱藏標題欄及標題欄居中
阿新 • • 發佈:2018-11-27
有的時候我們的標題欄上會有兩個按鈕,如果運用不好會出現再其他機型上不居中的情況,或者當我們引用地圖的話,為了地圖的顯示區域變大,會隱藏標題欄。
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 即可解決。
希望能幫到有問題的小夥伴。