From d49032372e1ad262a313dc974d8de6bb6efbf784 Mon Sep 17 00:00:00 2001 From: MDN Date: Tue, 16 Mar 2021 00:26:29 +0000 Subject: [CRON] sync translated content --- .../web/api/document/elementsfrompoint/index.html | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 files/zh-cn/web/api/document/elementsfrompoint/index.html (limited to 'files/zh-cn/web/api/document/elementsfrompoint') diff --git a/files/zh-cn/web/api/document/elementsfrompoint/index.html b/files/zh-cn/web/api/document/elementsfrompoint/index.html new file mode 100644 index 0000000000..bea911988b --- /dev/null +++ b/files/zh-cn/web/api/document/elementsfrompoint/index.html @@ -0,0 +1,51 @@ +--- +title: DocumentOrShadowRoot.elementsFromPoint() +slug: Web/API/Document/elementsFromPoint +translation_of: Web/API/DocumentOrShadowRoot/elementsFromPoint +original_slug: Web/API/DocumentOrShadowRoot/elementsFromPoint +--- +

{{APIRef("Shadow DOM")}}{{SeeCompatTable}}

+ +

elementsFromPoint() 是 {{domxref("DocumentOrShadowRoot")}} 下的一个函数,该函数返还在特定坐标点下的HTML元素数组。

+ +

语法

+ +
var elements = document.elementsFromPoint(x, y);
+ +

参数

+ +
+
x
+
坐标点的水平坐标值
+
y
+
坐标点的垂向坐标值
+
+ +

返回值

+ +

一个包含 {{domxref('element')}} 对象的数组.

+ +

其他说明

+ + + + + + + + + + + + + + +
SpecificationStatusComment
{{SpecName('Shadow DOM','','elementsFromPoint()')}}{{Spec2('Shadow DOM')}}Initial definition.
+ +

浏览器兼容性

+ +
+ + +

{{Compat("api.DocumentOrShadowRoot.elementsFromPoint")}}

+
-- cgit v1.2.3-54-g00ecf