1.在jQuery之后引入”yezi.js”,搜一下就有了,或者用这个.
2.样式表中加入:

1
2
.AutomLeaf { positionfixed; opacity: 0z-index0 }
.AutomLeaffalling { positionfixedtop0left0; opacity: 0z-index0 }

3.执行:

1
2
3
jQuery.AutomLeafStart({leafsfolder:"http://demo.jq22.com/jQuery-yezi-141217210850/yezi/",howmanyimgsare:8,initialleafs:10,maxYposition:-10,multiplyclick:true,multiplynumber:2,infinite:true,fallingsequence:6000});
jQuery("div#botAgregar").on("click",function(){jQuery.AutomLeafAdd({leafsfolder:"http://demo.jq22.com/jQuery-yezi-141217210850/yezi/",add:8,})});
//  "http://demo.jq22.com/jQuery-yezi-141217210850/yezi/"为图片地址,"add:8"代表有1~8.png图片文件