aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/document/preferredstylesheetset/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/zh-cn/web/api/document/preferredstylesheetset/index.html')
-rw-r--r--files/zh-cn/web/api/document/preferredstylesheetset/index.html47
1 files changed, 47 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/document/preferredstylesheetset/index.html b/files/zh-cn/web/api/document/preferredstylesheetset/index.html
new file mode 100644
index 0000000000..b567cb2bf4
--- /dev/null
+++ b/files/zh-cn/web/api/document/preferredstylesheetset/index.html
@@ -0,0 +1,47 @@
+---
+title: Document.preferredStyleSheetSet
+slug: Web/API/Document/preferredStyleSheetSet
+translation_of: Web/API/Document/preferredStyleSheetSet
+---
+<div>{{APIRef("DOM")}}{{gecko_minversion_header("1.9")}}</div>
+
+<p><strong><code>preferredStyleSheetSet</code></strong> 属性会依网页作者的喜好回传阶层样式集。</p>
+
+<h2 id="语法">语法</h2>
+
+<pre class="syntaxbox"><var>preferredStyleSheetSet</var> = document.preferredStyleSheetSet
+</pre>
+
+<p><code>preferredStyleSheetSet</code> 指的是作者偏好的阶层样式集。内容取决于阶层样式集的次序与 <code>Default-Style</code> HTTP 标头内容.</p>
+
+<p>如果作者没有定义偏好的阶层样式集,就会回传空白的("")字符串。</p>
+
+<h2 id="范例">范例</h2>
+
+<pre class="brush: js">if (document.preferredStyleSheetSet) {
+ console.log("The preferred style sheet set is: " + document.preferredStyleSheetSet);
+} else {
+ console.log("There is no preferred style sheet.");
+}
+</pre>
+
+<h2 id="规范">规范</h2>
+
+<ul>
+ <li><a href="http://www.whatwg.org/specs/web-apps/current-work/#alternate-style-sheets" title="http://www.whatwg.org/specs/web-apps/current-work/#alternate-style-sheets">HTML5: Alternate Style Sheets</a></li>
+</ul>
+
+<h2 id="浏览器相容性">浏览器相容性</h2>
+
+
+
+<p>{{Compat("api.Document.preferredStyleSheetSet")}}</p>
+
+<h2 id="参见">参见</h2>
+
+<ul>
+ <li>{{domxref("document.lastStyleSheetSet")}}</li>
+ <li>{{domxref("document.selectedStyleSheetSet")}}</li>
+ <li>{{domxref("document.styleSheetSets")}}</li>
+ <li>{{domxref("document.enableStyleSheetsForSet()")}}</li>
+</ul>