CSS transform-box Property

❮ Previous Reference Next ❯


.example {
  width: 150px;
  height: 75px;
  background-color: blue;
  transform: rotate(20deg);
  transform-origin:50% 50%;
  transform-box: border-box;


The transform-box property defines the layout box to which the transform and transform-origin properties relate.

Default value:view-box
JavaScript syntax:

Standard Syntax

transform-box: content-box|border-box|fill-box|stroke-box|view-box|initial|inherit|revert|revert-layer|unset;

Browser Support

The numbers in the table specify the first browser version that fully supports the property.


Property Values

The following table describes the values of this property.

Value Description
content-box The content box is used as the reference box.
border-box The border box is used as the reference box.
fill-box The object bounding box is used as the reference box.
stroke-box The stroke bounding box is used as the reference box.
view-box The nearest SVG viewport is used as the reference box.
initial Sets this property to its default value.
inherit If specified, the associated element takes the computed value of its parent element animation-delay property.
revert Reverts the cascaded value of the property from its current value to the value the property
revert-layer Rollback styles to the ones specified in previous cascade layers.
unset Resets a property to its inherited value if the property naturally inherits from its parent, and to its initial value if not.

Default CSS Property Values

selectors {
  transform-box: view-box;
❮ Previous Reference Next ❯