CSSMediaRule

  • Revision slug: DOM/cssMediaRule
  • Revision title: cssMediaRule
  • Revision id: 58218
  • Created:
  • Creator: Developedbyme
  • Is current revision? No
  • Comment 13 words added

Revision Content

{{ DomRef() }}

An object representing a single CSS media rule. CSSMediaRule implements the CSSRule interface.

Properties

cssRules
Returns a CSSRuleList of the CSS rules in the media rule.
media
Specifies the intended destination medium for style information.

Methods

deleteRule
Deletes a rule from the style sheet.
insertRule
Inserts a new style rule into the current style sheet.

Specification

See also

  • {{ domxref("CSSRule") }}

Revision Source

<p>{{ DomRef() }}</p>
<p>An object representing a single CSS media rule. <code>CSSMediaRule</code> implements the <code><a href="/en/DOM/CSSRule" rel="custom">CSSRule</a></code> interface.</p>
<h2 name="Properties">Properties</h2>
<dl> <dt id="cssRules"><code>cssRules</code></dt> <dd>Returns a <code><a href="/en/DOM/CSSRuleList" title="en/DOM/CSSRuleList">CSSRuleList</a></code> of the CSS rules in the media rule.</dd> <dt><code>media</code></dt> <dd>Specifies the intended destination medium for style information.</dd>
</dl>
<h2 name="Methods">Methods</h2>
<dl> <dt id="deleteRule"><code>deleteRule</code></dt> <dd>Deletes a rule from the style sheet.</dd> <dt id="insertRule"><code>insertRule</code></dt> <dd>Inserts a new style rule into the current style sheet.</dd>
</dl>
<h2 name="Specification">Specification</h2>
<ul> <li><a class="external" href="http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSMediaRule" title="http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSMediaRule">DOM Level 2 CSS: CSSRule</a></li> <li><a class="external" href="http://dev.w3.org/csswg/cssom/#css-rules" title="http://dev.w3.org/csswg/cssom/#css-rules">CSS Object Model: CSS Rules</a></li>
</ul>
<h2>See also</h2>
<ul> <li>{{ domxref("CSSRule") }}</li>
</ul>
Revert to this revision