Answer the question
In order to leave comments, you need to log in
Why are the paths to the image not visible in CSS?
Hello everyone, the project is built on VUE CLI, when you try to set the path in styles using background: url("assets/image/img.svg"), the image simply does not load.
Tried a bunch of different variations with changing paths, still doesn't work.
lang="scss".
When inserting an image through a template in html, everything is loaded normally.
What could be the problem?
DECIDED THIS: url("[email protected]/assets/images/icons/buttons/btnDelitTable/hoverBtnRemove.svg");
Need to add ~
Answer the question
In order to leave comments, you need to log in
try typing in the address bar of your browser: "yoursite/assets/image/img.svg" if it shows a picture, then the problem is not in the path, if it doesn't show, then the path is wrong.
It seems to me that you are specifying the path not relative to the css file, but relative to the document.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question