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
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.
Thank you!
But it still isnt working for me
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')
Now it works, thank you