js-responsive-waterfall
v1.1.1
Published
A JS Library for waterfall layout
Downloads
8
Readme
- 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/[email protected]/dist/waterfall.min.js"></script>
Usage
<ul id="container"></ul>
let list = [{ url: 'demo.png' }];
waterfall(list, 'container');