1

TweenLite を試してみたところ、サイトからコードをコピーしたので気が狂いそうですが、アニメーション化できません。

CSS

.box{
  width: 100px;
  height: 300px;
  background-color: red;
}

html

<div class="box"></div>

JS

   setTimeout(function(){
        var target = $('.box');
        console.log("box = ", target);
        TweenLite.to(target, 1, {css:{height:"0px"}});
    },2000);

CSSも試しませんでした。

   setTimeout(function(){
        var target = $('.box');
        console.log("box = ", target);
        TweenLite.to(target, 1, {height:0});
    },2000);

はい、私はjqueryドキュメント対応メソッドにJSを持っています。TweenLite.js もロードしました。私が欠けているものを誰でも知っています。

4

1 に答える 1