ionic 頭部和底部
ion-header-bar
這個是固定在屏幕頂部的一個頭部標(biāo)題欄。如果給它加上'bar-subheader' 這個樣式,它就是副標(biāo)題。
用法
<ion-header-bar align-title="left" class="bar-positive"> <div class="buttons"> <button class="button" ng-click="doSomething()">Left Button</button> </div> <h1 class="title">Title!</h1> <div class="buttons"> <button class="button">Right Button</button> </div> </ion-header-bar> <ion-content> Some content! </ion-content>
API
屬性 | 類型 | 描述 |
---|---|---|
align-title
(optional)
|
string
|
這個是對齊 title 的。如果沒有設(shè)置,它將會按照手機(jī)的默認(rèn)排版(Ios的默認(rèn)是居中,Android默認(rèn)是居左)。它的值可以是 'left','center','right'。 |
no-tap-scroll
(optional)
|
boolean
|
默認(rèn)情況下,頭部標(biāo)題欄在點(diǎn)擊屏幕時內(nèi)容會滾動到頭部,可以將 no-tap-scroll 設(shè)置為 true 來禁止該動作。。它的值是布爾值(true/false)。 |
ion-footer-bar
知道了 ion-header-bar ,理解ion-footer-bar就輕松多啦!只是 ion-footer-bar 是在屏幕的底部。
用法
<ion-content> Some content! </ion-content> <ion-footer-bar align-title="left" class="bar-assertive"> <div class="buttons"> <button class="button">Left Button</button> </div> <h1 class="title">Title!</h1> <div class="buttons" ng-click="doSomething()"> <button class="button">Right Button</button> </div> </ion-footer-bar>
API
與 ion-header-bar 不同的是,ion-footer-bar 只有 align-title 這個 API。屬性 | 類型 | 描述 |
---|---|---|
align-title
(optional)
|
string
|
這個是對齊 title 的。如果沒有設(shè)置,它將會按照手機(jī)的默認(rèn)排版(Ios的默認(rèn)是居中,Android默認(rèn)是居左)。它的值可以是 'left','center','right'。 |
更多建議: