0.0.1 • Published 4 years ago

@d.reitzner/responsive-background-image v0.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

responsive-background-image

This uses <source> or srcset to dynamically change the background image of a given element

<div data-responsive-background>
    <picture>
        <source ...>
        <img src="example.png" alt="Example img">
    </picture>
</div>

Bind it after init:

//TBD