blob: 3a62362267a5315484959c020d7f298ae137dac6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
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/">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>
|