Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70904

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

$
0
0

@dungeonbaba wrote:

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!

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70904

Trending Articles