Ionic keyboard is resizing my background

2019-09-08 09:23发布

问题:

I'm a beginner in ionic version 1.x.x development. I tried to set full image background in my login page. But when the keyboard showed up, the background image is resizing and it's very annoying. Please help me. Thanks

.auth.scroll-content{ 
background: url('../../img/background/NIKE_5_Futsal.jpg') no-repeat; 
background-size: cover; 
background-position: center; 
margin: auto; 
z-index: 2; 
}
<ion-view hide-nav-bar="true">
    <ion-content padding="true" class="auth" scroll="false">
        <h3>Welcome</h3>

        <form name="loginForm" ng-submit="login.loginSubmit(loginForm.$valid)" novalidate>
            <div class="list">
                <label class="item item-input">
                    <input type="email" placeholder="Email" ng-model="login.userData.email" required />
                </label>
                <label class="item item-input">
                    <input type="password" placeholder="Password" ng-model="login.userData.password" required />
                </label>
                <button class="button button-full button-assertive" ng-disabled="loginForm.$invalid">Login</button>

                <button class="button button-full button-clear button-positive icon-right ion-chevron-right" ui-sref="register">Register</button>
            </div>
        </form>
    </ion-content>
</ion-view>