Skip to main content

Home > blockly > utils > dom > setCssTransform

utils.dom.setCssTransform() function

Sets the CSS transform property on an element. This function sets the non-vendor-prefixed and vendor-prefixed versions for backwards compatibility with older browsers. See https://caniuse.com/#feat=transforms2d

Signature:

export declare function setCssTransform(element: HTMLElement | SVGElement, transform: string): void;

Parameters

ParameterTypeDescription
elementHTMLElement | SVGElementElement to which the CSS transform will be applied.
transformstringThe value of the CSS transform property.

Returns:

void