Skip to main content
Module 10 · Lesson 1 of 437/60 in the course~18 min
Module lessons (1/4)

Transforms & Compositor Performance (Reflow vs GPU)

Lesson preview5 hands-on exercises readyModern HTML & CSS · Transforms, Transitions & Accessible Motion

Use translate, scale, rotate, and transform-origin on the GPU compositor instead of triggering layout reflow.

What you'll learn in this lesson

  • Move, scale, and rotate layers cleanly via transform (translate, scale, rotate, transform-origin) or modern standalone translate / scale properties.
  • Distinguish the three browser rendering pipeline stages (Layout -> Paint -> Composite) and explain why animating transform + opacity achieves smooth GPU performance.
  • Avoid shifting sibling boxes unintentionally (transform keeps original layout slot intact!).

Overview

Every animation frame (every 16.6ms at 60Hz, or 8.3ms at 120Hz!) moves pixels through three stages inside your browser:

Toggle animating layout offsets (top/left/width), paint properties (background-color), and GPU compositor transforms—plus simulate prefers-reduced-motion:

Sections covered in this lesson

  1. 1Why Animating left or width Stutters While transform Glides
  2. 2Explore the Browser Render Pipeline Live
Pro Lesson · Transforms, Transitions & Accessible Motion

Unlock "Transforms & Compositor Performance (Reflow vs GPU)" and the full Modern HTML & CSS curriculum

Use translate, scale, rotate, and transform-origin on the GPU compositor instead of triggering layout reflow.

Unlock all 5 hands-on exercises in this lesson plus every advanced WebAssembly module with automated checks.

  • Instant access to all advanced modules in Modern HTML & CSS plus 17 more courses
  • Hands-on browser exercises with automated test suites and solutions
  • 14-day money-back guarantee processed via Paddle.com

14-day guarantee · Cancel anytimeModule 1, all 18 interactive games, and cheatsheets are always free.