本文介绍了getBBox()vs getBoundingClientRect()vs getClientRects()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法找到使用这些功能的明确引用:
getBBox() getBoundingClientRect() 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?

推荐答案

getBBox 是在,它会在应用后返回 local 坐标系中的坐标

getBBox is defined in the SVG specification it returns coordinates in the local coordinate system after the application of transforms.

getBoundingClientRect getClientRects 在。它们的主要区别是它们在 outer SVG坐标系中返回坐标。

getBoundingClientRect and getClientRects are defined in the CSSOM specification. Their main difference is that they return coordinates in the outer SVG coordinate system.

这篇关于getBBox()vs getBoundingClientRect()vs getClientRects()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 22:26