How can I change background on the given page?

Hi!
I am pretty new to ionic and I was wondering how to change the background of the specific page.

Thanks for help!

Edit:
I want my background to be an img

// assuming you want to style the ion-content component
.ion-content{ 
    background-image: url('/path/to/img');
    background-color:red;
    background-position: center center;
    background-size: cover;
}

You can put this is your page-specific SCSS file or in the global app.scss file.

1 Like

Thank you!

But it still isnt working for me :confused:

css:

ion-content{ 
    background-image: url('tes.jpg');
    background-color:red;
    background-position: center center;
    background-size: cover;
}

tes.jpg is in the same folder as the page.

Did the background color change? If so you need to edit your image path. You might need to put the image in the assets folder and then use something like url('../../assets/tes.jpg')

1 Like

Now it works, thank you :grin:

1 Like