Skip to content

Commit

Permalink
docu
Browse files Browse the repository at this point in the history
  • Loading branch information
aFarkas committed Feb 14, 2015
1 parent 3aa722b commit f517466
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ The [unveilhooks plugin](plugins/unveilhooks) plugin enables lazySizes to lazylo
###[include plugin](plugins/include)
The [include plugin](plugins/include) plugin enables lazySizes to lazyload content, styles or AMD modules either simply postboned or conditionally (for example matching certain media queries). This extension also heavily simplifies architecture of conditional, dynamically changing responsive behavior and has an extreme great scalability.

###[bgset plugin](plugins/bgset)
###[bgset plugin - lazy responsive background-image](plugins/bgset)
The bgset plugin allows lazyload multiple background images with different resolutions/sizes (responsive background images). In case you only need one image use the unveilhooks extension.

###[scrollintent plugin](plugins/scrollintent)
Expand Down
6 changes: 4 additions & 2 deletions plugins/bgset/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#lazysizes bgset extension
#lazysizes bgset extension - responsive background images

This simple and small plugin allows you to define multiple background images with a width descriptor, similar to how ``img[srcset]`` works as also art directed images using media queries.
This simple and small plugin allows you to define multiple background images with a width descriptor, similar to how ``img[srcset]`` works as also art directed images using media queries, similar to how ``picture`` works.

The extension will then load the best image size for the current viewport and device. In case the browser does not support responsive images natively either picturefill, respimage or the [respimg polyfill plugin](../respimg) has to be used:

Expand Down Expand Up @@ -37,6 +37,8 @@ window.lazySizesConfig.customMedia = {
</script>

<div class="lazyload" data-bgset="image-200.jpg [--small] | image-300.jpg [--medium] | image-400.jpg"></div>
<!-- or without customMedia options: -->
<div class="lazyload" data-bgset="image-200.jpg [(max-width: 480px)] | image-300.jpg [(max-width: 700px)] | image-400.jpg"></div>
```

Of course also resolution switching and art direction can be combined:
Expand Down

0 comments on commit f517466

Please sign in to comment.