Ionic2页脚工具栏文本不占用IOS上的全部宽度
问题描述:
我在我的ionic2应用程序中有一个页脚工具栏,它具有中心对齐的文本,但文本似乎只占中心宽度的50%左右工具栏,然后用椭圆切断(见图)。宽度似乎对应于标题工具栏允许的文本宽度(我在图像中变灰)。有没有办法来覆盖这个并使文本占据整个空间?到目前为止,我只在iPhone 6上注意到这个问题,尽管我还没有尝试过很多设备。Ionic2页脚工具栏文本不占用IOS上的全部宽度
<ion-content class="no-scroll">
<ion-tabs [selectedIndex]="mySelectedIndex">
tabs omitted..
</ion-tabs>
</ion-content>
<ion-footer>
<ion-toolbar color="{{threatLevelColor}}">
<ion-title *ngIf="threatLevel" text-center>
Security Threat Level: {{threatLevel.level}}
</ion-title>
</ion-toolbar>
</ion-footer>
答
您可以将以下SCSS
变化仅适用于iOS
平台。
.scss
的.html
<ion-footer>
<ion-toolbar color="{{threatLevelColor}}">
<ion-title *ngIf="threatLevel" text-center class="padding-0">
Security Threat Level: {{threatLevel.level}}
</ion-title>
</ion-toolbar>
</ion-footer>
你能告诉你的'html'? – Sampath
对不起,添加到原文章 – user123959