当前位置:K88软件开发文章中心编程语言APP编程ionic01 → 文章内容

ionic 头部和底部

减小字体 增大字体 作者:佚名  来源:网上搜集  发布时间:2019-1-12 6:35:12

ionic 头部和底部ion-header-bar这个是固定在屏幕顶部的一个头部标题栏。如果给它加上'bar-subheader' 这个样式,它就是副标题。用法<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 的。如果没有设置,它将会按照手机的默认排版(Ios的默认是居中,Android默认是居左)。它的值可以是 'left','center','right'。no-tap-scroll(optional)boolean默认情况下,头部标题栏在点击屏幕时内容会滚动到头部,可以将 no-tap-scroll 设置为 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 的。如果没有设置,它将会按照手机的默认排版(Ios的默认是居中,Android默认是居左)。它的值可以是 'left','center','right'。

ionic 头部和底部