Put background image on all the pages of my project

1

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

    
asked by An3Ramirez 22.01.2018 в 16:07
source

1 answer

0

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;
}
    
answered by 22.01.2018 в 19:13