getBBox() vs getBoundingClientRect() vs getClientRects()
问题 I am unable to find an explicit reference for the use of these functions: getBBox() vs getBoundingClientRect() vs getClientRects() . Could you explain what they do and what are the coordinates (and their referential) they return? 回答1: getBBox is defined in the SVG specification it returns coordinates in the local coordinate system after the application of transforms. getBoundingClientRect and getClientRects are defined in the CSSOM specification. Their main difference is that they return