Mantieni tutto organizzato con le raccolte
Salva e classifica i contenuti in base alle tue preferenze.
blockly > utils > stile > getComputedStyle
Funzione utils.style.getComputedStyle()
Recupera un valore di stile calcolato di un nodo. Restituisce una stringa vuota se la proprietà richiesta è di tipo SVG e non è stata impostata esplicitamente (Firefox e webkit).
Copiato da goog.style.getComputedStyle di Closure
Firma:
export declare function getComputedStyle(element: Element, property: string): string;
Parametri
Parametro |
Tipo |
Descrizione |
elemento |
Elemento |
Elemento di cui ottenere lo stile. |
proprietà |
stringa |
Proprietà da prendere (caso di cammello). |
Resi:
stringa
Valore stile.
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."],[[["`utils.style.getComputedStyle()` retrieves the computed style value of an element for a specified property."],["It returns an empty string for SVG properties that haven't been explicitly set in Firefox and Webkit."],["This function mirrors the functionality of Closure's `goog.style.getComputedStyle`."],["The function accepts the element and the desired CSS property (in camelCase) as input."],["It returns the computed style value as a string."]]],[]]