1.card {2 transform:3 translate(60px, 20px)4 rotate(30deg)5 scale(1.5);6}index.htmlText after the card.card80 × 50 layout141 × 125 drawna1b0c0d1e0f0matrix(a, b, c, d, e, f)StyleLayoutskippedPaintskippedCompositetranslaterotatescaletransform
Left: style.css and the matrix(a, b, c, d, e, f) it becomesRight: the page (dashed = layout box) and the rendering stepsTokens: each transform function on its way to the cardLeft: style.css with one transform list, and the six entries of the matrix it becomes. Right: the browser's page, where the dashed outline is the card's layout box, and the four rendering steps. Each function changes only how the card is drawn: it moves, turns 30° clockwise about its centre and grows 1.5 times, while the layout box and the paragraph stay put. Swapping two functions moves the card elsewhere; a transform change skips layout. A real browser applies the whole transform list at once, as one matrix. The figure adds the functions one at a time so you can see what each one does.

The box and the rule

  1. The page has a div with class card, then a paragraph. Layout gives the card an 80 × 50 px box in the flow; the dashed outline marks it. With no transform, the card is drawn exactly in that box.

Function by function

What the browser does

What happens

;; step 1/9 · layout-box
index.html, inside <body>:
  <div class="card">card</div>
  <p>Text after the card.</p>
layout box   80 × 50 px at (48, 32)
paragraph    starts at y = 98 px
transform    none (the initial value)

A real browser applies the whole transform list at once, as one matrix. The figure adds the functions one at a time so you can see what each one does. MDN says the functions are multiplied in order from left to right, so measured in page coordinates the rightmost function acts on the points first (scale, then rotate, then translate). Reading left to right, with each function working in the box's own moved and turned coordinates, describes the same matrix (CSS Transforms 1, transformation matrix computation). Whether paint is skipped is up to the browser: it needs the element on its own compositor layer, which browsers often create for transform animations. Layout is skipped either way.