Capítulo 51 de 411
fromTo() inserts a .fromTo()-style tween into the timeline — shorthand for add(gsap.fromTo(...)).
| Parameter | Type | Description |
|---|---|---|
target | Object | Array | String | target(s) or selector text |
fromVars | Object | starting values only (no special props like duration/ease here) |
toVars | Object | ending values + special props |
position | Number | String | where in the timeline |
tl.fromTo(".box", { opacity: 0 }, { opacity: 1, duration: 1 });
duration/ease/delay in fromVars: those special properties belong only in toVars.