aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/dompoint/y/index.html
blob: ea4baedabd0d51a27c6876bf15801d09b80ef552 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
---
title: DOMPoint.y
slug: Web/API/DOMPoint/y
translation_of: Web/API/DOMPoint/y
---
<div>{{APIRef("DOM")}}</div>

<p><span class="seoSummary"><code><strong>DOMPoint</strong></code> 的 <code><strong>y</strong></code> 属性表示该点的垂直坐标。</span><code>y</code> 值增加表示向下偏移,减小表示向上偏移,除非改变了默认轴方向。</p>

<h2 id="语法">语法</h2>

<pre class="syntaxbox">var <em>yPos</em> = <em>DOMPoint</em>.y;</pre>

<h3 id="值"></h3>

<p>双精度浮点值,表示该点的 y 坐标值。这个值的类型并没有严格限制,意味着它可以是 {{jsxref("NaN")}}{{jsxref("Infinity", "±Infinity")}}</p>

<h2 id="规范">规范</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
  <tr>
   <td>{{SpecName('Geometry Interfaces', '#dom-dompoint-y', 'y')}}</td>
   <td>{{Spec2('Geometry Interfaces')}}</td>
   <td>Initial definition</td>
  </tr>
 </tbody>
</table>

<h2 id="浏览器兼容性">浏览器兼容性</h2>



<p>{{Compat("api.DOMPointReadOnly.y")}}</p>

<h2 id="相关链接">相关链接</h2>

<ul>
 <li>其他坐标属性: {{domxref("DOMPoint.x", "x")}}, {{domxref("DOMPoint.z", "z")}}, 透视值 {{domxref("DOMPoint.w", "w")}}</li>
</ul>