aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/conflicting/web/api/documentorshadowroot
diff options
context:
space:
mode:
Diffstat (limited to 'files/zh-cn/conflicting/web/api/documentorshadowroot')
-rw-r--r--files/zh-cn/conflicting/web/api/documentorshadowroot/elementfrompoint/index.html46
-rw-r--r--files/zh-cn/conflicting/web/api/documentorshadowroot/elementsfrompoint/index.html130
-rw-r--r--files/zh-cn/conflicting/web/api/documentorshadowroot/getselection/index.html16
-rw-r--r--files/zh-cn/conflicting/web/api/documentorshadowroot/stylesheets/index.html27
4 files changed, 0 insertions, 219 deletions
diff --git a/files/zh-cn/conflicting/web/api/documentorshadowroot/elementfrompoint/index.html b/files/zh-cn/conflicting/web/api/documentorshadowroot/elementfrompoint/index.html
deleted file mode 100644
index c33269a9d3..0000000000
--- a/files/zh-cn/conflicting/web/api/documentorshadowroot/elementfrompoint/index.html
+++ /dev/null
@@ -1,46 +0,0 @@
----
-title: Document.elementFromPoint()
-slug: conflicting/Web/API/DocumentOrShadowRoot/elementFromPoint
-translation_of: Web/API/DocumentOrShadowRoot/elementFromPoint
-translation_of_original: Web/API/Document/elementFromPoint
-original_slug: Web/API/Document/elementFromPoint
----
-<div>
- {{APIRef()}}</div>
-<h2 id="Summary" name="Summary">概述</h2>
-<p>返回当前文档上处于指定坐标位置最顶层的元素, 坐标是相对于包含该文档的浏览器窗口的左上角为原点来计算的, 通常 x 和 y 坐标都应为正数.</p>
-<h2 id="Syntax" name="Syntax">语法</h2>
-<pre><em>var element</em> = document.elementFromPoint(<em>x</em>, <em>y</em>);</pre>
-<ul>
- <li><code>element</code> 是返回的DOM<a href="/en-US/docs/DOM/element" title="DOM/element">元素</a>.</li>
- <li><code>x</code> 和 <code>y</code> 是坐标数值, 不需要单位比如px.</li>
-</ul>
-<h2 id="Example" name="Example">示例</h2>
-<pre class="brush:html">&lt;!DOCTYPE html&gt;
-&lt;html lang="en"&gt;
-&lt;head&gt;
-&lt;title&gt;elementFromPoint example&lt;/title&gt;
-
-&lt;script&gt;
-function changeColor(newColor) {
- elem = document.elementFromPoint(2, 2);
- elem.style.color = newColor;
-}
-&lt;/script&gt;
-&lt;/head&gt;
-
-&lt;body&gt;
-&lt;p id="para1"&gt;Some text here&lt;/p&gt;
-&lt;button onclick="changeColor('blue');"&gt;blue&lt;/button&gt;
-&lt;button onclick="changeColor('red');"&gt;red&lt;/button&gt;
-&lt;/body&gt;
-&lt;/html&gt;
-</pre>
-<h2 id="Notes" name="Notes">附注</h2>
-<p>If the element at the specified point belongs to another document (for example, an iframe's subdocument), the element in the DOM of the document the method is called on (in the iframe case, the iframe itself) is returned. If the element at the given point is anonymous or XBL generated content, such as a textbox's scroll bars, then the first non-anonymous ancestor element (for example, the textbox) is returned.</p>
-<p>If the specified point is outside the visible bounds of the document or either coordinate is negative, the result is <code>null</code>.</p>
-<p>{{Note("Callers from XUL documents should wait until the <code>onload</code> event has fired before calling this method.")}}</p>
-<h2 id="Specification" name="Specification">规范</h2>
-<ul>
- <li>Preliminary specification: <code><a class="external" href="http://dev.w3.org/csswg/cssom-view/#dom-document-elementfrompoint">elementFromPoint</a></code></li>
-</ul>
diff --git a/files/zh-cn/conflicting/web/api/documentorshadowroot/elementsfrompoint/index.html b/files/zh-cn/conflicting/web/api/documentorshadowroot/elementsfrompoint/index.html
deleted file mode 100644
index 3b1043f630..0000000000
--- a/files/zh-cn/conflicting/web/api/documentorshadowroot/elementsfrompoint/index.html
+++ /dev/null
@@ -1,130 +0,0 @@
----
-title: Document.elementsFromPoint()
-slug: conflicting/Web/API/DocumentOrShadowRoot/elementsFromPoint
-translation_of: Web/API/DocumentOrShadowRoot/elementsFromPoint
-translation_of_original: Web/API/Document/elementsFromPoint
-original_slug: Web/API/Document/elementsFromPoint
----
-<div>{{APIRef("DOM")}}{{SeeCompatTable}}</div>
-
-<p><code><strong>elementsFromPoint()</strong></code> 方法可以获取到当前视口内指定坐标处,由里到外排列的所有元素。</p>
-
-<h2 id="语法">语法</h2>
-
-<pre class="brush: js">var<em> elements</em> = <em>document</em>.elementsFromPoint(<em>x</em>, <em>y</em>);</pre>
-
-<h3 id="返回值">返回值</h3>
-
-<p>一个包含多个元素的数组</p>
-
-<h3 id="参数">参数</h3>
-
-<dl>
- <dt>x</dt>
- <dd>当前视口内某一点的横坐标</dd>
- <dt>y</dt>
- <dd>当前视口内某一点的纵坐标</dd>
-</dl>
-
-<h2 id="Example" name="Example">示例</h2>
-
-<h3 id="HTML">HTML</h3>
-
-<pre class="brush: html">&lt;div&gt;
- &lt;p&gt;Some text&lt;/p&gt;
-&lt;/div&gt;
-&lt;p&gt;Elements at point 30, 20:&lt;/p&gt;
-&lt;div id="output"&gt;&lt;/div&gt;
-</pre>
-
-<h3 id="JavaScript">JavaScript</h3>
-
-<pre class="brush: js;highlight[1]">var output = document.getElementById("output");
-if (document.elementsFromPoint) {
- var elements = document.elementsFromPoint(30, 20);
- for(var i = 0; i &lt; elements.length; i++) {
- output.textContent += elements[i].localName;
- if (i &lt; elements.length - 1) {
- output.textContent += " &lt; ";
- }
- }
-} else {
- output.innerHTML = "&lt;span style=\"color: red;\"&gt;" +
- "您的浏览器不支持 &lt;code&gt;document.elementsFromPoint()&lt;/code&gt;" +
- "&lt;/span&gt;";
-}</pre>
-
-<p>{{EmbedLiveSample('Example', '420', '120')}}</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('CSSOM View', '#dom-document-elementsfrompoint', 'elementsFromPoint')}}</td>
- <td>{{Spec2('CSSOM View')}}</td>
- <td>Initial definition.</td>
- </tr>
- </tbody>
-</table>
-
-<h2 id="浏览器兼容性">浏览器兼容性</h2>
-
-<p>{{CompatibilityTable}}</p>
-
-<div id="compat-desktop">
-<table class="compat-table">
- <tbody>
- <tr>
- <th>Feature</th>
- <th>Chrome</th>
- <th>Firefox (Gecko)</th>
- <th>Internet Explorer</th>
- <th>Opera</th>
- <th>Safari</th>
- </tr>
- <tr>
- <td>Basic support</td>
- <td> {{CompatChrome(43.0)}}</td>
- <td>{{CompatGeckoDesktop("46.0")}}<sup>[1]</sup></td>
- <td>10.0 {{property_prefix("ms")}}</td>
- <td>{{CompatUnknown}}</td>
- <td>{{CompatSafari(11)}}</td>
- </tr>
- </tbody>
-</table>
-</div>
-
-<div id="compat-mobile">
-<table class="compat-table">
- <tbody>
- <tr>
- <th>Feature</th>
- <th>Android</th>
- <th>Android Webview</th>
- <th>Firefox Mobile (Gecko)</th>
- <th>IE Mobile</th>
- <th>Opera Mobile</th>
- <th>Safari Mobile</th>
- <th>Chrome for Android</th>
- </tr>
- <tr>
- <td>Basic support</td>
- <td>{{CompatNo}}</td>
- <td>{{CompatChrome(43.0)}}</td>
- <td>{{CompatGeckoMobile("46.0")}}<sup>[1]</sup></td>
- <td>{{CompatUnknown}}</td>
- <td>{{CompatUnknown}}</td>
- <td>{{CompatSafari(11)}}</td>
- <td>{{CompatChrome(43.0)}}</td>
- </tr>
- </tbody>
-</table>
-</div>
-
-<p> </p>
diff --git a/files/zh-cn/conflicting/web/api/documentorshadowroot/getselection/index.html b/files/zh-cn/conflicting/web/api/documentorshadowroot/getselection/index.html
deleted file mode 100644
index dce4bc9c58..0000000000
--- a/files/zh-cn/conflicting/web/api/documentorshadowroot/getselection/index.html
+++ /dev/null
@@ -1,16 +0,0 @@
----
-title: document.getSelection
-slug: conflicting/Web/API/DocumentOrShadowRoot/getSelection
-translation_of: Web/API/DocumentOrShadowRoot/getSelection
-translation_of_original: Web/API/Document/getSelection
-original_slug: Web/API/Document/getSelection
----
-<article class="approved text-content" style="padding-right: 10px; width: 652px; float: left;">
-<div class="boxed translate-rendered" style="">
-<p>{{APIRef("DOM")}}</p>
-
-<p>该方法的功能等价于 {{domxref("Window.getSelection()")}} 方法;其返回一个 {{domxref("Selection")}} 对象,表示文档中当前被选择的文本。</p>
-</div>
-</article>
-
-<p> </p>
diff --git a/files/zh-cn/conflicting/web/api/documentorshadowroot/stylesheets/index.html b/files/zh-cn/conflicting/web/api/documentorshadowroot/stylesheets/index.html
deleted file mode 100644
index 088be5bd6b..0000000000
--- a/files/zh-cn/conflicting/web/api/documentorshadowroot/stylesheets/index.html
+++ /dev/null
@@ -1,27 +0,0 @@
----
-title: Document.styleSheets
-slug: conflicting/Web/API/DocumentOrShadowRoot/styleSheets
-translation_of: Web/API/DocumentOrShadowRoot/styleSheets
-translation_of_original: Web/API/Document/styleSheets
-original_slug: Web/API/Document/styleSheets
----
-<div>{{APIRef}}</div>
-
-<p><strong><code>Document.styleSheets</code></strong> 只读属性,返回一个由 {{domxref("StyleSheet ")}} 对象组成的 {{domxref("StyleSheetList")}},每个 {{domxref("StyleSheet ")}} 对象都是一个文档中链接或嵌入的样式表。</p>
-
-<h2 id="Syntax" name="Syntax">语法</h2>
-
-<pre class="syntaxbox">let <var>styleSheetList</var> = <em>document</em>.styleSheets;
-</pre>
-
-<p>返回的对象是一个 {{domxref("StyleSheetList")}}。</p>
-
-<p>它是一个 {{domxref("StyleSheet")}} 对象的有序集合。<code><em>styleSheetList</em>.item(<em>index</em>)</code> 或 <code><em>styleSheetList</em>{{ mediawiki.External('<em>index</em>') }}</code> 根据它的索引(索引基于0)返回一个单独的样式表对象。</p>
-
-<pre class="syntaxbox"> </pre>
-
-<h2 id="Specification" name="Specification">规范</h2>
-
-<ul>
- <li><a class="external" href="http://www.w3.org/TR/DOM-Level-2-Style/stylesheets.html#StyleSheets-DocumentStyle-styleSheets">DOM Level 2 Style: styleSheets</a></li>
-</ul>