首先导入不用说了
导入本地:
<script type="text/javascript" src="src/minified/TweenMax.min.js"></script>
<script type="text/javascript" src="src/minified/easing/EasePack.min.js"></script>
或者是cdn
<script src="http://cdnjs.cloudflare.com/ajax/libs/gsap/latest/plugins/CSSPlugin.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/gsap/latest/easing/EasePack.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/gsap/latest/TweenLite.min.js"></script>
一,第一个比较实用的效果,yoyo
TweenMax.to("#i3",2,{scale:2,repeat:-1,yoyo:true});
注意必须是tweeenMax而不是tweenlite, repeat为重复次数, -1是无限循环。
二,旋转