【发布时间】:2018-06-11 18:16:01
【问题描述】:
我遇到了键盘问题。我有一个包含 5 个输入字段的列表的页面。当键盘显示时页面向上推,当键盘隐藏时页面位置保持不变。当我检查它时,显示即使在键盘隐藏之后也存在padding-bottom:300px。
有没有相同的解决方案?请在下面找到html代码
<ion-content padding #content>
<img src="assets/imgs/ic_tutorial_three.png" style="height:150px;width:150px">
<ion-card>
<ion-item>
<ion-avatar item-end class="margin-bottom-none" *ngIf="validCurrentKey">
<img src="assets/imgs/ic_tick.png" class="tick-button">
</ion-avatar>
<ion-label color="primary" stacked>Your Current PIN</ion-label>
<ion-input type="password" placeholder="PIN" (ionChange)='checkCurrentPassword($event)'></ion-input>
</ion-item>
<ion-item >
<ion-label color="primary" stacked>Enter Your New PIN</ion-label>
<ion-input type="password" placeholder="PIN" [(ngModel)]="newPin"></ion-input>
</ion-item>
<ion-item>
<ion-label color="primary" stacked>RE-Enter Your New PIN</ion-label>
<ion-input type="password" placeholder="PIN" (ionChange)="validateNewPassword($event)"></ion-input>
</ion-item>
</ion-card>
<div class="bottom-button">
<button ion-button round full class="submit-button" (click)="goBack()" >UPDATE PIN</button>
</div>
我对这个问题有同样的问题ionic 3 -Keyboard pushes the whole screen up
【问题讨论】: