Precisely tune the transformation origin

transform-box

Specify whether the transform-origin should account for the padding, borders and margins of the element.

Property values

This property allows a tranformation's origin to be adjusted to account for unbalanced padding and borders, which might otherwise throw the offset calculation off.

border-box The border box is used as the reference, which accounts for any padding and borders
fill-box The bounding box is used as the reference, which accounts for any padding, borders and margins
view-box When used with SVG elements, its viewBox width, height, and coordinate system are used

Examples

transform-box: border-box;
transform-box
0

style > transform > transform-boxPrecisely tune the transformation origin

🔗 🔎