window.getComputedStyle
Returns an object containing the values of all CSS properties of an element, after applying active stylesheets and resolving any basic computation those values may contain.
Returns: CSSStyleDeclaration - - A live CSSStyleDeclaration object, which updates automatically when the element's styles are changed.
See: window.getComputedStyle
Param
Type
Description
element
ElementThe Element for which to get the computed style.
pseudoState
stringA string specifying the pseudo-element to match. Omitted (or null) for real elements.