timeline

Javascript

複数のアニメーションをつなげるメソッド

基本的な使い方

const tl = gsap.timeline();
tl.to(".box", {
    y: -50,
    duration: 1,
});
tl.to(".box", {
    rotation: 360,
    duration: 1.
});

※ 2つ目以降の「tl.to」は「.to」と省略できます

全体を無限リピートしたいとき

const tl = gsap.timeline({repeat: -1});
BACK