diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
commit | 33058f2b292b3a581333bdfb21b8f671898c5060 (patch) | |
tree | 51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/api/cssgroupingrule | |
parent | 8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff) | |
download | translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2 translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip |
initial commit
Diffstat (limited to 'files/zh-cn/web/api/cssgroupingrule')
-rw-r--r-- | files/zh-cn/web/api/cssgroupingrule/index.html | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/cssgroupingrule/index.html b/files/zh-cn/web/api/cssgroupingrule/index.html new file mode 100644 index 0000000000..a77564e2e2 --- /dev/null +++ b/files/zh-cn/web/api/cssgroupingrule/index.html @@ -0,0 +1,82 @@ +--- +title: CSSGroupingRule +slug: Web/API/CSSGroupingRule +tags: + - API + - CSSOM + - 参考 + - 接口 +translation_of: Web/API/CSSGroupingRule +--- +<p>{{ APIRef("CSSOM") }}</p> + +<p>任何实现了 <code>CSSGroupingRule</code> 接口的对象表示任何可以包含或嵌套其他规则的的 CSS @ 规则。</p> + +<p>从其派生的对象:</p> + +<ul> + <li>{{domxref("CSSConditionRule")}} 及其派生的对象:{{domxref("CSSMediaRule")}}、{{domxref("CSSSupportsRule")}},和 {{domxref("CSSDocumentRule")}}。</li> + <li>{{domxref("CSSPageRule")}}</li> +</ul> + +<h2 id="Properties" name="Properties">语法</h2> + +<p>The syntax is described using the <a href="http://dev.w3.org/2006/webapi/WebIDL/" title="http://dev.w3.org/2006/webapi/WebIDL/">WebIDL</a> format.</p> + +<pre>interface CSSGroupingRule : CSSRule { + readonly attribute CSSRuleList cssRules; + unsigned long insertRule (DOMString rule, unsigned long index); + void deleteRule (unsigned long index); +} +</pre> + +<h2 id="所有_CSSGroupingRule_实例共有的属性">所有 CSSGroupingRule 实例共有的属性</h2> + +<p>The <code>CSSGroupingRule</code> derives from {{domxref("CSSRule")}} and inherits all properties of this class. It has one specific property:</p> + +<dl> + <dt id="cssRules">{{domxref("CSSGroupingRule.cssRules")}} {{readonlyinline}}</dt> + <dd>Returns a {{domxref("CSSRuleList")}} of the CSS rules in the media rule.</dd> +</dl> + +<h2 id="所有_CSSGroupingRule_实例共有的方法">所有 CSSGroupingRule 实例共有的方法</h2> + +<p>The <code>CSSGroupingRule</code> derives from {{domxref("CSSRule")}} and inherits all methods of this class. It has two specific methods:</p> + +<dl> + <dt id="deleteRule">{{domxref("CSSGroupingRule.deleteRule")}}</dt> + <dd>Deletes a rule from the style sheet.</dd> + <dt id="insertRule">{{domxref("CSSGroupingRule.insertRule")}}</dt> + <dd>Inserts a new style rule into the current style sheet.</dd> +</dl> + +<h2 id="Specification" name="Specification">规范</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-cssgroupingrule-interface', 'CSSGroupingRule') }}</td> + <td>{{ Spec2('CSS3 Conditional') }}</td> + <td>Initial definition.</td> + </tr> + </tbody> +</table> + +<h2 id="浏览器兼容性">浏览器兼容性</h2> + + + +<p>{{Compat("api.CSSGroupingRule")}}</p> + +<h2 id="参见">参见</h2> + +<ul> + <li><a href="/en/DOM/Using_dynamic_styling_information" title="en/DOM/Using_dynamic_styling_information">Using dynamic styling information</a></li> +</ul> |