
这是一个非常酷的jQuery插件,用于页面掉落装饰的特殊效果. jQuery插件可以在页面顶部生成各种叶子. 这些叶子会随机掉落. 在树叶秋天的过程中css3实现树叶飘落,使用鼠标单击将具有更神奇的效果.

jQuery插件支持IE10以上的所有最新版本的现代浏览器css3实现树叶飘落,并在手机上进行了优化. 使用起来也非常简单.

使用落叶jQuery插件需要引入jQuery和jquery.rotate.js插件以及jquery.classyleaves.min.css和jquery.classyleaves.min.js文件.

<link rel="stylesheet" type="text/css" href="css/jquery.classyleaves.min.css" />
<script src="jquery/1.10.2/jquery.min.js"></script>
<script src="js/jquery.rotate.js"></script>
<script src="js/jquery.classyleaves.min.js"></script>

页面DOM元素加载后,可以通过以下方法初始化落叶插件.
var tree = new ClassyLeaves({
leaves: 30,
maxY: -10,
multiplyOnClick: true,
multiply: 2,
infinite: true,
speed: 4000
});
如果需要动态添加叶子数,可以使用以下方法:
本文来自电脑杂谈,转载请注明本文网址:
https://www.pc-fly.com/a/jisuanjixue/article-196418-1.html
没有激烈冲突
美帝是不是太无耻了