【问题标题】:Ionic header title not vertically align middle for some android devices对于某些 android 设备,离子标题标题不垂直居中对齐
【发布时间】:2017-06-27 04:33:26
【问题描述】:

我正在开发一个带有 ionic 框架和 cordova 的应用程序。但是现在我遇到了一个问题。标题标题不能垂直居中对齐。

屏幕截图:

代码:

<ion-header-bar class="bar-balanced" align-title="center">
    <button class="button button-icon" ng-click="logout()">
      <i class="icon ion-log-out">Logout</i>
    </button>
    <ion-title>Title</ion-title>
</ion-header-bar>

【问题讨论】:

    标签: android ionic-framework vertical-alignment title


    【解决方案1】:

    找到答案:

    ion-title {
        position: absolute;
        top: 0;
        left: 0;
        padding: 0 90px 1px;
        width: 100%;
        height: 100%;
        text-align: center;
    }
    

    只需将此添加到您的 CSS 中

    【讨论】:

    • 感谢您的回答。不幸的是,它没有用。
    猜你喜欢
    • 2016-06-20
    • 2018-05-01
    • 2016-10-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多