Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ionic 2 - Adding a background image to a page

I have just installed a new Ionic project - Ionic v2.0.0-beta.32

Im looking to add a background image to the home page of the fresh install, is there anyone that could show me how i go about this? All i can find is information for Ionic 1 and things seems quite different.

From what ive found, the image needs to be the following dimensions

2800px x 2800px

But apart from that i cant find any other tutorials.

This is my first Ionic project so be gentle

Thanks you guys

like image 268
BigJobbies Avatar asked Jul 25 '16 11:07

BigJobbies


1 Answers

For Ionic V4 they use some new switch in the scss file. This worked for me:

ion-content {
  --background: url('../../assets/Welcome-screen.png')  no-repeat 50% 10%;
}
like image 66
C13 Avatar answered Sep 20 '22 14:09

C13