0
votes

I tried to set background image for my div with codes below:

background-image: url(../wwwroot/resources/images/LoginBackground.jpg);

but it doesn't work, I try ' and " in url but it doesn't work also.

1

1 Answers

1
votes

This path is the relative path after compilation, you can use <img > to judge.

<img src="./resources/images/LoginBackground.jpg"/>

If it can show the image, this path can be assigned to url().

background-image:url('./resources/images/LoginBackground.jpg')