1.1.1 • Published 5 years ago
js-responsive-waterfall v1.1.1
- This is a js function includes css + div + promise that contains waterfall flow layout
- load item that includes image(promise) one by one, pass if image onerror
- Simple to use pass a params data to function waterfall
- Responsive layout mobile pc pad
- If your browser doesn't support promise, please instal promise-polyfill
Installation
npm install js-responsive-waterfall --save
import { waterfall } from 'js-responsive-waterfall'
<script src="https://unpkg.com/js-responsive-waterfall@1.0.8/dist/waterfall.min.js"></script>
Usage
<ul id="container"></ul>
let list = [{ url: 'demo.png' }];
waterfall(list, 'container');