Skip to content

Instantly share code, notes, and snippets.

@magemore
Created April 25, 2012 04:53
Show Gist options
  • Save magemore/2486517 to your computer and use it in GitHub Desktop.
Save magemore/2486517 to your computer and use it in GitHub Desktop.
Add a “loading image” to, well, loading images
img {
background: url(loader.gif) no−repeat 50% 50%;
}
@magemore
Copy link
Author

Useful for those with high-resolution image-heavy websites, like portfolio or gallery sites. Instead of having visitors stare at a blank section of your page wondering if they need to refresh or something, you can have a animated GIF image of a “loading circle” giving visual confirmation that everything’s fine and the image is loading.
Animated GIF is not included, you could create your own here: Ajaxload – Ajax loaing GIF generator.

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