Capítulo 4 de 411
GSAP can animate essentially any CSS-related property of a DOM element — transforms, opacity, colors, and most values you'd try — through camelCase property names, without a separate plugin.
font-size → fontSize, background-color → backgroundColor).position, borderStyle) are snapped instantly rather than tweened — applied at the start of the tween, except display: "none" which applies at the end.x, y, xPercent, yPercent, scale, rotation, rotationX/Y, skew) replace writing out a transform string, and GSAP always applies them in a fixed, predictable order (translate → scale → rotationX → rotationY → skew → rotation).gsap.to(element, {
backgroundColor: "red",
fontSize: 12,
boxShadow: "0px 0px 20px 20px red",
borderRadius: "50% 50%",
height: "auto", // can tween to/from "auto"
});
gsap.to(element, {
// equivalent to transform: translate(-50%, -50%), but faster and order-safe
xPercent: -50,
yPercent: -50,
});
transform string.transform strings manually: forces GSAP to apply the string, then re-parse the resulting matrix — slower and order-of-operations-sensitive versus using the built-in shorthand aliases.background-image (or other binary properties) to tween smoothly: there's no valid intermediate value between two images, so GSAP can't interpolate them.x, scale, rotation, etc.) over hand-written transform strings for both performance and predictable ordering.