-3

code Can anyone help? Background-image doesn't appear on the page,

althouth address seem to be correct, two levels up in the folder. but still doesn't appear.

yanakin
  • 1
  • 2

2 Answers2

1

If your SASS output and referenced stylesheet is /assets/sass/app.css your relative links will be relative to that, so it should be url("../images/title-image.jpg") as the "sass" folder is on the same level as the "images" folder.

Reference: Using relative URL in CSS file, what location is it relative to?

Also the parentheses are missing. Reference: https://www.w3schools.com/css/css_background_image.asp

0

Try this way:

<div class="back-img">
</div>

Css:

.back-img {
  height: 300px;
  background-image: url(https://img-host.wemotion.co.jp/uploads/tMXOFn.png);
  background-repeat: no-repeat;
}
ashirhusaain
  • 255
  • 2
  • 6