Background image not working in Ionic / Javascript / Angular

My background image is not working for this ionic project in css. It works if I embed it in HTML, but its messy. I remember hearing something about base64, but not sure. Does anyone know what the problem is? Thanks

+4
source share
2 answers

put the images you want to use in the project in the www / img folder, and then set their style in your html file.

, eg:

 <ion-content  style="background: url(img/image_name.jpg) center; background-size: cover;">
0
source

, . : www img css img, :

www/img/myImage.png

../img/myImage.png

: - , , www

0

Source: https://habr.com/ru/post/1625259/


All Articles