Geometry Interfaces
DOMRect() 构造函数创建一个新的 DOMRect 对象。
语法
new DOMRect(x, y, width, height)
参数
- DOMRect.x
- :
DOMRect原点的 x 坐标。
- :
- DOMRect.y
- :
DOMRect原点的 y 坐标。
- :
- DOMRect.width
- :
DOMRect的宽度。
- :
- DOMRect.height
- :
DOMRect的高度。
- :
返回值
一个新的 DOMRect 对象。
规范
浏览器兼容性
参见
- DOMPoint
- DOMRect
- DOMRect.fromRect_static
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
