Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
blockly > utils > dom > setCssTransform
Imposta la proprietà transform CSS su un elemento. Questa funzione imposta le versioni con prefisso senza fornitore e con prefisso del fornitore per garantire la compatibilità con le versioni precedenti dei browser. Vedi https://caniuse.com/#feat=transforms2d
Firma:
export declare function setCssTransform(element: HTMLElement | SVGElement, transform: string): void;
Parametri
Parametro |
Tipo |
Descrizione |
elemento |
HTMLElement | SVGElement |
Elemento a cui verrà applicata la trasformazione CSS. |
trasformazione |
stringa |
Il valore della proprietà transform del CSS. |
Resi:
null
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2025-07-25 UTC.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Mancano le informazioni di cui ho bisogno","missingTheInformationINeed","thumb-down"],["Troppo complicato/troppi passaggi","tooComplicatedTooManySteps","thumb-down"],["Obsoleti","outOfDate","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Problema relativo a esempi/codice","samplesCodeIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-07-25 UTC."],[[["The `setCssTransform` function applies CSS transforms to HTML or SVG elements, ensuring compatibility with various browsers."],["It takes the element and the desired transform string as input and sets the necessary CSS properties for the element."],["This function improves cross-browser compatibility for CSS transforms by setting both vendor-prefixed and non-prefixed versions of the `transform` property."],["It directly modifies the element's style and does not return any value."]]],["The `setCssTransform()` function applies a CSS transform to an HTML or SVG element. It accepts two parameters: `element`, the target element for the transformation, and `transform`, a string representing the desired CSS transform value. It sets both vendor-prefixed and non-prefixed CSS transform properties to ensure compatibility across various browsers. This function does not return any value.\n"]]