Reputation: 41
I used an image as background in my ionic app using this css code
.contentcolor{
background-image: url('../../assets/Capture3.PNG');
background-repeat: no-repeat;
background-position: center;
background-size: full;
}
But when I run my app on emulator or hard device the image doesn't appear. And when I inspected I found this :
How can I solve it?
Upvotes: 1
Views: 68
Reputation: 124
Where are your images located? I assume in the assets folder? I think you are referencing to a non-existing file.
EDIT: Try using: background-image: url('./../assets/Capture3.PNG');
Upvotes: 1