Skip to content

Instantly share code, notes, and snippets.

@baladkb
Last active October 9, 2017 08:14
Show Gist options
  • Save baladkb/1ef6eb62063aff9fb8d4a3bc3729c29a to your computer and use it in GitHub Desktop.
Save baladkb/1ef6eb62063aff9fb8d4a3bc3729c29a to your computer and use it in GitHub Desktop.
Image not loading issue in CSS (background-image:url())

Image not loading issue Fix

once we set background-image:url() and the url not working means how we can handel ?

if it Javascript means we can achieve easly but in CSS how ?

Answer :

.className
{
background-image:url(ourImageURLfromDB.jpg),url(noImageAvilable.jpg);
}

First image url not loaded means it'll run on second image url.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment