I need to modify the main template of my project in ionic 3 to be able to put a background image to all the pages of my project
I'm working under Ionic CLI 3.19.1 thanks
I need to modify the main template of my project in ionic 3 to be able to put a background image to all the pages of my project
I'm working under Ionic CLI 3.19.1 thanks
To add an image on all the pages in Ionic it is necessary to make the following adjustments.
Change the color of background to transparent in the file ~/src/theme/variables.scss
:
$background-color: transparent;
Add to the directory ~/src/assets/imgs/
the image to be used in background.
~/src/assets/imgs/background.jpg
In the ~/src/app/app.scss
file add the following styles:
ion-content {
background-image: url("../assets/imgs/background.png");
background-size: cover;
background-position: center;
}