diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
commit | 33058f2b292b3a581333bdfb21b8f671898c5060 (patch) | |
tree | 51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/api/domrectreadonly/index.html | |
parent | 8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff) | |
download | translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2 translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip |
initial commit
Diffstat (limited to 'files/zh-cn/web/api/domrectreadonly/index.html')
-rw-r--r-- | files/zh-cn/web/api/domrectreadonly/index.html | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/domrectreadonly/index.html b/files/zh-cn/web/api/domrectreadonly/index.html new file mode 100644 index 0000000000..7d32eba68d --- /dev/null +++ b/files/zh-cn/web/api/domrectreadonly/index.html @@ -0,0 +1,77 @@ +--- +title: DOMRectReadOnly +slug: Web/API/DOMRectReadOnly +translation_of: Web/API/DOMRectReadOnly +--- +<p>{{APIRef("Geometry Interfaces")}}</p> + +<p><strong><code>DOMRectReadOnly</code></strong> 接口通过详细列出 {{domxref("DOMRect")}} 所使用的标准属性来定义一个属性不可变的矩形。</p> + +<h2 id="构造函数">构造函数</h2> + +<dl> + <dt>{{domxref("DOMRectReadOnly.DOMRectReadOnly","DOMRectReadOnly()")}}</dt> + <dd>用来创建新的 <code>DOMRectReadOnly</code> 对象,但请注意,该构造函数不能由第三方 JavaScript 调用:这样做将返回 “Illegal constructor” 类型错误。</dd> +</dl> + +<h2 id="属性">属性</h2> + +<dl> +</dl> + +<dl> + <dt>{{domxref("DOMRectReadOnly.x")}} {{readonlyInline}}</dt> + <dd><code>DOMRect</code> 原点的 x 坐标。</dd> + <dt>{{domxref("DOMRectReadOnly.y")}} {{readonlyInline}}</dt> + <dd><code>DOMRect</code> 原点的 y 坐标。</dd> + <dt>{{domxref("DOMRectReadOnly.width")}} {{readonlyInline}}</dt> + <dd><code>DOMRect</code> 的宽度。</dd> + <dt>{{domxref("DOMRectReadOnly.height")}} {{readonlyInline}}</dt> + <dd><code>DOMRect</code> 的高度。</dd> + <dt>{{domxref("DOMRectReadOnly.top")}} {{readonlyInline}}</dt> + <dd>返回 <code>DOMRect</code> 的顶部坐标值(通常与 <code>y</code> 相同)。</dd> + <dt>{{domxref("DOMRectReadOnly.right")}} {{readonlyInline}}</dt> + <dd>返回 <code>DOMRect</code> 的右坐标值(通常与 <code>x + width</code> 相同)。</dd> + <dt>{{domxref("DOMRectReadOnly.bottom")}} {{readonlyInline}}</dt> + <dd>返回 <code>DOMRect</code> 的底部坐标值(通常与 <code>y + height</code> 相同)。</dd> + <dt>{{domxref("DOMRectReadOnly.left")}} {{readonlyInline}}</dt> + <dd>返回 <code>DOMRect</code> 的左坐标值(通常与 <code>x</code> 相同)。</dd> +</dl> + +<h2 id="静态方法">静态方法</h2> + +<dl> + <dt>{{domxref("DOMRectReadOnly.fromRect()")}}</dt> + <dd>使用指定的位置和尺寸创建一个新的 <code>DOMRect</code> 对象。</dd> +</dl> + +<h2 id="Specification" name="Specification">规范</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', '#DOMRect', 'DOMRectReadOnly')}}</td> + <td>{{Spec2('Geometry Interfaces')}}</td> + <td>Initial definition.</td> + </tr> + </tbody> +</table> + +<h2 id="浏览器兼容性">浏览器兼容性</h2> + +<div> + + +<p>{{Compat("api.DOMRectReadOnly")}}</p> +</div> + +<h2 id="其他">其他</h2> + +<ul> + <li>{{domxref("DOMPoint")}}</li> +</ul> |