aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/conflicting/web/api/documentorshadowroot/stylesheets/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/zh-cn/conflicting/web/api/documentorshadowroot/stylesheets/index.html')
-rw-r--r--files/zh-cn/conflicting/web/api/documentorshadowroot/stylesheets/index.html27
1 files changed, 27 insertions, 0 deletions
diff --git a/files/zh-cn/conflicting/web/api/documentorshadowroot/stylesheets/index.html b/files/zh-cn/conflicting/web/api/documentorshadowroot/stylesheets/index.html
new file mode 100644
index 0000000000..088be5bd6b
--- /dev/null
+++ b/files/zh-cn/conflicting/web/api/documentorshadowroot/stylesheets/index.html
@@ -0,0 +1,27 @@
+---
+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>