◆ 动画方案同屏对比

五种方案实现同一动画目标:盒子从起点到终点来回移动 | 时长 2s | 缓动 cubic-bezier(0.22, 1, 0.36, 1)

CSS Animation 声明式

@keyframes
FPS: -- 合成器:

Web Animation API 编程控制

element.animate()
FPS: -- 合成器:

GSAP 专业库

gsap.to()
FPS: -- Tween: 1

Framer Motion Spring 物理

motion.div + spring
FPS: -- 刚度: 300

Lottie JSON 驱动

lottie.loadAnimation()
FPS: -- 帧: 60