blockly > utils > dom > setCssTransform

utils.dom.setCssTransform() 函式

設定元素上的 CSS 轉換屬性。為了與舊版瀏覽器回溯相容,這個函式會設定非供應商前置字元及廠商前綴版本。詳情請參閱 https://caniuse.com/#feat=transforms2d

Signature:

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

參數

參數 類型 說明
元素 HTMLElement | SVGElement 要套用 CSS 轉換的元素。
transform 字串 CSS transform 屬性的值。

傳回:

void