I'm working on an ionic3 application. Everything is great, except, when uses the keyboard in inputs or the inputs are focused the background image resizes and it makes the view horrible. I googled a lot I found the following questions in forums. Unfortunately, they didn't work for me in ionic3.
image resize in ionic. image resize in ionic And now I'm going to provide some codes.
<ion-header>
<ion-navbar>
<ion-title>
ورود به حساب
</ion-title>
</ion-navbar>
</ion-header>
<ion-content>
<div class="login">
<div class="login-form">
<ion-grid>
<ion-row>
<ion-col col-sm-12>
<ion-list inset>
<ion-item>
<ion-label ionitron-bot>
<ion-icon name="person"></ion-icon>
</ion-label>
<ion-input
[(ngModel)]="phone"
type="tel"
placeholder="794737444"
></ion-input>
</ion-item>
</ion-list>
</ion-col>
</ion-row>
<ion-row>
<ion-col col-sm-12></ion-col>
</ion-row>
</ion-grid>
</div>
</div>
</ion-content>
**
Scss style codes.
page-new-user {
ion-content{
height: 100%;
}
div.login {
width: 100%;
height: 100%;
background: url("../../../assets/imgs/bg-01.jpg") no-repeat;
background-size: cover;
background-position: 100% 100%;
height: 100%;
div.login-form {
width: 50%;
height: auto;
margin: auto;
background-color: #ddd;
}
}
}
And now I'm going to provide screenshots of the app.