基于jQuery的waterfall(瀑布流)布局

阅读更多

 
 
	 
	基于Jquery的瀑布流布局(绝对定位) 
	
	
	
	
	
 
 

  • 使用方法:

    1,导入jquery和setwaterfall插件,可直接查看源代码script id="setwaterfall"为该插件,或者点击setwaterfall.js

    2,如$("li").setwaterfall(),li为要瀑布流化的元素

    3,设置相应的css,要求父层定位为position:relative;瀑布流的元素定位为position:absolute

    4,根据需要设置宽和高,padding和mairgin

    ps:简陋版本,仅供参考

你可能感兴趣的:(jquery,html,waterfall,布局,layout)