aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/csssupportsrule/index.html
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/api/csssupportsrule/index.html
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/zh-cn/web/api/csssupportsrule/index.html')
-rw-r--r--files/zh-cn/web/api/csssupportsrule/index.html103
1 files changed, 103 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/csssupportsrule/index.html b/files/zh-cn/web/api/csssupportsrule/index.html
new file mode 100644
index 0000000000..2bea90d1bb
--- /dev/null
+++ b/files/zh-cn/web/api/csssupportsrule/index.html
@@ -0,0 +1,103 @@
+---
+title: CSSSupportsRule
+slug: Web/API/CSSSupportsRule
+translation_of: Web/API/CSSSupportsRule
+---
+<p>{{APIRef("CSSOM")}}</p>
+
+<p>该 <strong><code>CSSSupportsRule</code></strong> 接口描述了代表一个 CSS 对象{{cssxref("@supports")}} <a href="/en-US/docs/Web/CSS/At-rule">at-rule</a>. 它实现了 {{domxref("CSSConditionRule")}} 接口, 因此 {{domxref("CSSRule指定规则")}} 和{{domxref("CSSGroupingRule")}} 用一个类型值接口 <code>12</code> (<code>CSSRule.SUPPORTS_RULE</code>).</p>
+
+<h2 id="句法">句法</h2>
+
+<p>该语法使用所描述的<a href="http://dev.w3.org/2006/webapi/WebIDL/">WebIDL</a> 格式.</p>
+
+<pre class="syntaxbox">接口 CSSSupportsRule : CSSConditionRule {
+}
+</pre>
+
+<h2 id="性能">性能</h2>
+
+<p>作为{{domxref("CSSConditionRule")}} 因此一个 {{domxref("CSSRule指定规则")}} and和一{{domxref("CSSGroupingRule")}}, <code>CSSSupportsRule</code> 还实现了,这些接口的属性。它没有特定的属性</p>
+
+<h2 id="方法">方法</h2>
+
+<p>作为{{domxref("CSSConditionRule")}} 因此一个 {{domxref("CSSRule指定规则")}}和{{domxref("CSSGroupingRule")}}, <code>CSSSupportsRule</code> 也实现了这个接口的方法。他没有具体属性的方法</p>
+
+<h2 id="规范">规范</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">规范</th>
+ <th scope="col">状态</th>
+ <th scope="col">注释</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{ SpecName('CSS3 Conditional', '#the-csssupportsrule-interface', 'CSSSupportsRule') }}</td>
+ <td>{{ Spec2('CSS3 Conditional') }}</td>
+ <td>初始定义</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 (WebKit)</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatGeckoDesktop("17")}}<sup>[1]</sup></td>
+ <td>{{CompatNo}}</td>
+ <td>12.10</td>
+ <td>{{CompatNo}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<div id="compat-mobile">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Android</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>IE Phone</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatGeckoMobile("17")}}<sup>[1]</sup></td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<p>[1] 作为前叠这规则是没有意义的 <code>CSSSupportsRule</code> 只支持,如果用户可以通过设置配置的值i<code>layout.css.supports-rule.enable</code> 的真实.</p>
+
+<p>从Firefox 17到 Firefox 19 在内, <code>CSSSupportsRule</code> 直接来自 <code>CSSRule</code> 的方法和属性定义在 <code>CSSConditionRule</code>现在的水平,在 <code>CSSSupportsRule</code>定义.该规范草案改变了,并已更新了 Firefox 20 was updated.</p>
+
+<h2 id="See_also">See also</h2>
+
+<ul>
+ <li>{{cssxref("@supports")}}</li>
+</ul>