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/cssrule/parentstylesheet | |
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/cssrule/parentstylesheet')
-rw-r--r-- | files/zh-cn/web/api/cssrule/parentstylesheet/index.html | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/cssrule/parentstylesheet/index.html b/files/zh-cn/web/api/cssrule/parentstylesheet/index.html new file mode 100644 index 0000000000..a630c0d29d --- /dev/null +++ b/files/zh-cn/web/api/cssrule/parentstylesheet/index.html @@ -0,0 +1,36 @@ +--- +title: CSSRule.parentStyleSheet +slug: Web/API/CSSRule/parentStyleSheet +translation_of: Web/API/CSSRule/parentStyleSheet +--- +<p>{{ APIRef("CSSOM") }}</p> + +<h3 id="Summary" name="Summary">概述</h3> + +<p><strong>parentStyleSheet</strong> 返回在当前规则中已定义的样式表对象。</p> + +<h3 id="Syntax" name="Syntax">语法</h3> + +<pre class="eval"><em>stylesheet</em> = cssRule.parentStyleSheet +</pre> + +<h3 id="Parameters" name="Parameters">参数</h3> + +<ul> + <li><code>stylesheet</code>是一个样式表对象。</li> +</ul> + +<h3 id="Example" name="Example">例子</h3> + +<pre class="eval">if ( bgRule.parentStyleSheet != mySheet ) { + // alien style rule! +} +</pre> + +<h3 id="Notes" name="Notes">备注</h3> + +<p>查看 <a href="en/Gecko_DOM_Reference/event#DOM_styleSheet_Object">Gecko DOM Reference:event#DOM_styleSheet_Object</a> 有关样式表的对象接口的详细信息。</p> + +<h3 id="Specification" name="Specification">规范</h3> + +<p>DOM Level 2 Style - cssRule</p> |