CSSTransformComponent

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

The CSSTransformComponent interface of the CSS Typed Object Model API is part of the CSSTransformValue interface.

Instance properties

CSSTransformComponent.is2D Read only

Returns a boolean indicting whether the transform is 2D or 3D.

Instance methods

CSSTransformComponent.toMatrix()

Returns a new DOMMatrix object.

CSSTransformComponent.toString()

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 CSSRotate and is2D is false then the string returned will be in the form of the CSS transformation rotate3D() function. If true the string returned will be in the form of the 2-dimensional rotate3D() function.

Examples

To do

Specifications

Specification
CSS Typed OM Level 1
# csstransformcomponent

Browser compatibility

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
CSSTransformComponent
is2D
toMatrix
toString

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
See implementation notes.