Capítulo 89 de 411
to() inserts a .to()-style tween into the timeline — the most common way to add animation to a sequence. Shorthand for add(gsap.to(...)).
| Parameter | Type | Description |
|---|---|---|
target | Object | Array | String | target(s) or selector text |
vars | Object | ending values + special props |
position | Number | String | where in the timeline |
tl.to(".box", { x: 100, duration: 1 }).to(".box2", { y: 50, duration: 1 });