0
How can we access any value from css such as "height:20px" using javascript
I want to access width of a shape designed on css and want to access its value using javascript
2 Answers
+ 3
Refer to Mozilla official documents
https://developer.mozilla.org/en-US/docs/Web/API/Window/getComputedStyle
+ 1
Use object.getComputedStyle(element,pseudo-element).getPropertyValue(propertyname)
https://www.w3schools.com/jsref/jsref_getcomputedstyle.asp