Setting background image using CSS

Sorry for the silly question, I’ve just been trying to set a background image for my app using CSS, and it isnt working. I copied the asset path and pasted it.

body {
background-image: url(“_/theme/lebanese-cedar630.webp”)
background-repeat: no-repeat
}

Those are not double quotes. You need to make sure you use "

2 Likes

Hi!
In my case, to load an image from the assets folder of my app, I had to change the _/theme/ part of the asset path to ./

Try using url("./lebanese-cedar630.webp") instead of url("_/theme/lebanese-cedar630.webp").

1 Like