1.0.0 • Published 7 years ago

coverimage v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

CoverImage

Scrutinizer Code Quality

Takes an element and uses the first image found to replicate the behaviour of background-size: cover from CSS.

The advantage of this method is that you get all the semantics/accessibility of an image present within the mark-up.

Usage

 <div data-cover-image>
   <img src="http://example.com/cat.jpg"/>
 </div>
 <script src="https://unpkg.com/coverimage/dist/coverimage.js"></script>

Contributing

Please do.

1.0.0

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago