aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/cssstylerule/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/zh-cn/web/api/cssstylerule/index.html')
-rw-r--r--files/zh-cn/web/api/cssstylerule/index.html54
1 files changed, 54 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/cssstylerule/index.html b/files/zh-cn/web/api/cssstylerule/index.html
new file mode 100644
index 0000000000..9d3c7655a5
--- /dev/null
+++ b/files/zh-cn/web/api/cssstylerule/index.html
@@ -0,0 +1,54 @@
+---
+title: CSSStyleRule
+slug: Web/API/CSSStyleRule
+tags:
+ - API
+ - CSSOM
+ - 参考
+ - 接口
+translation_of: Web/API/CSSStyleRule
+---
+<div>{{ APIRef("CSSOM") }}</div>
+
+<p><strong><code>CSSStyleRule</code></strong> 表示一条 CSS 样式规则。它实现了 {{domxref("CSSRule")}} 接口,类型的值为 <code>1</code>(<code>CSSRule.STYLE_RULE</code>)。</p>
+
+<h2 id="属性">属性</h2>
+
+<dl>
+ <dt id="selectorText">{{domxref("CSSStyleRule.selectorText")}}</dt>
+ <dd>返回这条规则的、文本格式的选择器,例如 <code>"h1,h2"</code>。</dd>
+ <dt id="style">{{domxref("CSSStyleRule.style")}} {{readonlyinline}}</dt>
+ <dd>返回这条规则的 {{domxref("CSSStyleDeclaration")}} 对象。</dd>
+ <dt>{{domxref("CSSStyleRule.styleMap")}} {{readonlyinline}}</dt>
+ <dd>返回一个 {{domxref('StylePropertyMap')}} 对象,which provides access to the rule's property-value pairs.</dd>
+</dl>
+
+<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('CSSOM', '#the-cssstylerule-interface', 'CSSStyleRule') }}</td>
+ <td>{{ Spec2('CSSOM') }}</td>
+ <td>No changes</td>
+ </tr>
+ <tr>
+ <td>{{ SpecName('DOM2 Style', 'css.html#CSS-CSSStyleRule', 'CSSRule') }}</td>
+ <td>{{ Spec2('DOM2 Style') }}</td>
+ <td></td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="浏览器兼容性">浏览器兼容性</h2>
+
+
+
+<p>{{Compat("api.CSSStyleRule")}}</p>