CKTIS / CSS
transform — visual transformations
The transform property translates, rotates, scales, or skews an element without changing the flow of surrounding content. Function order matters.
Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required
Syntax
transform: none | <transform-list>;
<transform-list> = <transform-function>+transform accepts none (the initial value) or a space-separated function list, such as translateX(), rotate(), and scale(). It is not inherited. Transformation changes appearance, not the space reserved in layout; it can nevertheless enlarge the overflow area.
Order matters: when mapping points, functions act from right to left. In the example, scale(2) doubles the dimensions, then translateX(20px) moves the result by 20 CSS pixels. transform-origin: 0 0 places the origin at the top-left corner.
On a transformable element with a CSS layout box, a value other than none, even scale(1), creates a stacking context and a containing block for descendants positioned with position: absolute or position: fixed. For example, transform does not apply to non-replaced inline boxes.
Examples
<!doctype html>
<meta charset="utf-8">
<title>transform</title>
<style>
body { margin: 0; }
.box {
width: 40px;
height: 20px;
background: navy;
transform-origin: 0 0;
transform: translateX(20px) scale(2);
}
</style>
<div class="box"></div>Result
Expected visual bounds in CSS pixels: left=20, top=0, width=80, height=40.
The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.