官网:http://macyjs.com/
github网址:https://github.com/bigbite/macy.js
使用方法
<div id="macy-container">
<div class="demo" >
<img src="aa.jpg" />
</div>
</div>
</body>
<script src="macy.js"></script>
<script>
       var masonry = new Macy({
        container: '#macy-container', // 图像列表容器id
        trueOrder: false,
        waitForImages: false,
        useOwnImageLoader: false,
        debug: true,
        //设计间距
        margin: {
            x: 10,
            y: 10
        },
        //设置列数
        columns: 6,
        
        //定义不同分辨率(1200,940,520,400这些是分辨率)
        breakAt: {
          1200: {
            columns: 5,
            margin: {
                x: 23,
                y: 4
            }
          },
          940: {
            margin: {
                y: 23
            }
          },
          520: {
            columns: 3,
            margin: 3,
          },
          400: {
            columns: 2
          }
        }
      });
</script>
