0
votes

I'm my html page I have a ion-content with the class getstart, with a background image, placed in assets/img. It works perfectly into the web browser, but wen I test the app with the apk, the background remains white.

I know that It's a recurrent question, but all the answers that I found (in this and other sites) don't work for me.

This is my scss code, placed inside app.scss

  .getstart{
    background: url('../assets/img/venice.jpg') no-repeat center center fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    background-size: cover;

  }

I tried changing che image url like '/assets/img/venice.jpg' , but nothing worked.

I'm really stuck :( Thank you in advance!

SOLVED: Silly mistake. My background image was venice.JPG and not .jpg so the apk didn't recognize any image. I changed my extension's file an all worked. Thank for the help!

2

2 Answers

1
votes

Everything seems to be correct, just as you already tried the link "assets/img/venice.jpg".

Did you inspect your device via chrome? maybe the picture si missing there. Try to change the name of the picture. No idea why but this helped my once.

-1
votes

every thing is perfect but i thing this would the best try to use this

enter code here background: url(../../assets/imgs/Login.png) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;