How do I set the fixed background image in my Ionic 4 app?

I am using Ionic 4 . On my Login Page whenever keyboard is pressed, background image scrolls up. I found no workaround until now.

I applied below css to ion-content :

ion-content{
 --background: #fff url('/assets/img/bigscren.jpg') no-repeat center center / cover !important;
 --background-size: cover !important;
 --background-attachment: fixed;
}

This is my front page:

<ion-content padding>
//My Content
</ion-content>

I also applied fixed attribute to ion-content (from latest ionic doc) but that also not working.

Please help me out. Thanks!

try

<ion-content padding class="background">
//your content
</ion-content>
ion-content.background{
    --background: url('/assets/img/bigscren.jpg') 0 0/100% 100% no-repeat;
}

it’s run for me

just for the link, at home I : (…/…/assets/img/backgroundviolet.png)

it’s on a test app and it works well.
the background does not move