Skip to content
\n

The end result is this:\n

\n

...but the background image isn't rendering.\n

What am I doing wrong? I'm guessing this has something to do with actually rendering the image?\n

Thanks.","upvoteCount":1,"answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"

(facepalm)\n

The image I was trying to load included a space. Because I hadn't enclosed the background-image:url in quotes, it was erroring.\n

Corrected code:\n

","upvoteCount":1,"url":"https://github.com/aFarkas/lazysizes/discussions/944#discussioncomment-2292522"}}}

Lazyload background-image of div elements #944

Answered by boxedpaul
boxedpaul asked this question in Q&A
Discussion options

You must be logged in to vote

(facepalm)

The image I was trying to load included a space. Because I hadn't enclosed the background-image:url in quotes, it was erroring.

Corrected code:

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by boxedpaul
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant