Giter Site home page Giter Site logo

waterfalllayout's Introduction

waterfallLayout

瀑布流布局插件

使用说明:

$("selector").waterfallLayout({
     "marginLeft": 20,
    "marginTop": 15,
    "picPadding": 10,
    "numPerLine" : 4,
    "waterfallElement": "li"
})

参数说明:

可选:

 margimLeft: 元素左边距
 
 marginTop: 元素上边距
 
 picPadding: 元素内图片边距
 
 numPerLine: 每行元素个数
 
 waterfallElement: 元素节点名称

重要提示:必须在图片加载、DOM绘制完成之后再进行布局,否则无法获取图片高度,导致页面错乱

推荐使用jquery插件:jquery.waitforimages.js,以确保图片加载完成

jquery.waitforimages.js插件地址:https://github.com/alexanderdickson/waitForImages

waterfalllayout's People

Contributors

hquestion avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.