aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/screen/availleft/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/zh-cn/web/api/screen/availleft/index.html')
-rw-r--r--files/zh-cn/web/api/screen/availleft/index.html25
1 files changed, 25 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/screen/availleft/index.html b/files/zh-cn/web/api/screen/availleft/index.html
new file mode 100644
index 0000000000..d5cf983be3
--- /dev/null
+++ b/files/zh-cn/web/api/screen/availleft/index.html
@@ -0,0 +1,25 @@
+---
+title: Screen.availLeft
+slug: Web/API/Screen/availLeft
+translation_of: Web/API/Screen/availLeft
+---
+<p>{{ ApiRef() }}</p>
+<h3 id="Summary" name="Summary">概述</h3>
+<p>返回浏览器可用空间左边距离屏幕(系统桌面)左边界的距离。</p>
+<h3 id="Syntax" name="Syntax">语法</h3>
+<pre class="eval">iAvail = window.screen.availLeft
+</pre>
+<h3 id="Example" name="Example">示例</h3>
+<pre class="eval">setY = window.screen.height - window.screen.availTop;
+setX = window.screen.width - window.screen.availLeft;
+window.moveTo(setX, setY);
+</pre>
+<h3 id="Notes" name="Notes">备注</h3>
+<p>大多数情况下,该属性返回 0。</p>
+<p>如果你在有两个屏幕的电脑上使用该属性,在右侧屏幕计算该属性值时,返回左侧屏幕的宽度(单位:像素),也即左侧屏幕左边界的 X 坐标。</p>
+<p>在 Windows 中,该属性值取决于哪个屏幕被设为主屏幕,返回相对于主屏幕左边界的 X 坐标。就是说,即使主屏幕不是左侧的屏幕,它的左边界的 X 坐标也是返回 0。如果副屏幕在主屏幕的左侧,则它拥有负的 X 坐标。</p>
+<p>[1] [2] - 左屏幕 <em>availLeft</em> 返回 <strong>0</strong>,右侧的屏幕返回左侧屏幕的宽度</p>
+<p>[2] [1] - 左侧屏幕 <em>availLeft</em> 返回该屏幕的 <strong>-width</strong>,右侧屏幕返回 <strong>0</strong></p>
+<h3 id="Specification" name="Specification">规范</h3>
+<p>DOM Level 0。不属于任何规范。</p>
+<p>{{ languages( { "ja": "ja/DOM/window.screen.availLeft" } ) }}</p>