Back to Content

CSSTransformComponent: toString() method

files/en-us/web/api/csstransformcomponent/tostring/index.md

latest937 B
Original Source

{{APIRef("CSS Typed OM")}}

The toString() method of the {{domxref("CSSTransformComponent")}} interface is a {{Glossary("stringifier")}} returning a CSS Transforms function.

Syntax

js-nolint
toString()

Parameters

None.

Return value

A string in the form of a CSS transform function.

This will use the value of is2D to return either a 2D or 3D transform. For example if the component represents {{domxref("CSSRotate")}} and is2D is false then the string returned will be in the form of the CSS transformation {{cssxref("transform-function/rotate3d", "rotate3d()")}} function. If true the string returned will be in the form of the 2-dimensional {{cssxref("transform-function/rotate", "rotate()")}} function.

Examples

To Do

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}