Name
CSSMediaRule — an @media rule in a CSS style sheet
Availability
DOM Level 2 CSS
Inherits from/Overrides
CSSRule → CSSMediaRule
Properties
-
readonly
CSSRuleList
cssRules
An array (technically, a CSSRuleList) of all the rules nested within this
@media
rule block.-
readonly
MediaList
media
The list of media types to which the nested rules apply.
Methods
-
deleteRule( )
Deletes the nested rule at the specified position.
-
insertRule( )
Inserts a new rule at the specified position within this
@media
rule block.
Description
This interface represents an @media
rule, and all
of its nested rules, in a CSS style sheet. It defines methods that
allow you to insert and delete nested rules. Consult a CSS reference
for details.
Get JavaScript: The Definitive Guide, Fourth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.