transform-box
Widely availableSince 202097% of users
Defines the bounding box that a transform (like a rotation or scale) is relative to. This is especially important for SVG elements where you might want to rotate an object around its own center instead of the SVG's top-left corner.
What's modern
From web-features, MDN's browser data and our snippets, checked dailyModernIn every major browser since January 2020. Widely available since July 2022.
Newer parts of transform-box
content-boxBaseline Apr 2024, Widely Oct 2026stroke-boxBaseline Apr 2024, Widely Oct 2026border-boxBaseline Oct 2023, Widely Apr 2026
See how modern your own CSS is.Check your CSS →
Quick facts
- Initial value
view-box- Inherited
- No
- Applies to
- transformable elements
- Animation type
- discrete
Quick example
svg .gear {
transform-origin: center;
/* Ensures the gear rotates around its own center, not the SVG viewport coordinate (0,0) */
transform-box: fill-box;
transform: rotate(45deg);
}Values
content-boxborder-boxfill-boxstroke-boxview-boxtransform-box browser support
BaselineWidely availableThis feature is well established and works across many devices and browser versions. It has been available across browsers since 2020.Safe to use without fallbacks.
Usage97%of people can use this3% use a browser without it.
Browsers
64+
55+
11+
79+Mobile
64+Android
55+Android
11+iOS