getBoundingClientRect

DOM getBoundingClientRect()

The getBoundingClientRect () method returns the width, height, x and y coordinate, top, bottom, right, and left values ​​of the specified element.