![]() |
VOOZH | about |
The getComputedStyle() method is used to get all the computed CSS property and values of the specified element. The use of computed style is displaying the element after stylings from multiple sources have been applied. The getComputedStyle() method returns a CSSStyleDeclaration object.
Syntax:
window.getComputedStyle(element, pseudoElement)
Parameters:
Example: Return font-family of text in div.
Output:
Supported Browsers: The browser supported by Window getComputedStyle() Method are listed below:
We have a complete list of HTML and Window methods, to check those please refer to this HTML DOM Complete Reference article