It looks like a suspicious straightforward question, but after searching the Google and StackOverflow, and have used the usual tricks ( getBoundingClientRect, clientWidth, offsetWidth), I have not found an answer.
Simply, is there a way to find the width / height of an element, including not only the border, padding, etc., but also the shadow?
See: jsfiddle for an example of how everything returns the width of an element without a shadow.
EDIT . Ideally, I would prefer not to examine the CSS attribute for the shadow and not analyze the dimensions, although this may be the only way.
source
share