Represents a media rule in a CSS style sheet.
Platform Support
IE | Mozilla | Netscape | Opera | Safari | no | 1.0+ | no | 9.0+ | 1.0+ |
---|
Constructors
Constructor | Action | IE | Mozilla | Netscape | Opera | Safari | ||
---|---|---|---|---|---|---|---|---|
CSSMediaRule Constructor() : CSSMediaRule
Represents a media rule in a CSS style sheet.
|
Show Details | no | 1.0+ | no | 9.0+ | 1.0+ | ||
CSSMediaRule() : CSSMediaRuleRepresents a media rule in a CSS style sheet. Returns
|
Inherited Properties
Property | Action | IE | Mozilla | Netscape | Opera | Safari |
---|---|---|---|---|---|---|
cssText
: String
Text for the current CSS rule.
|
Show Details | 6.0+ | 1.0+ | no | 9.0+ | 1.0+ |
|
||||||
parentRule
: CSSRule
Parent rule for the current CSS rule.
|
Show Details | 6.0+ | 1.0+ | no | 9.0+ | 1.0+ |
|
||||||
parentStyleSheet
: CSSStyleSheet
CSS style sheet that contains the rule.
|
Show Details | no | 1.0+ | no | 9.0+ | 1.0+ |
|
||||||
type
: Number
Type of CSS rule.
|
Show Details | no | 1.0+ | no | 9.0+ | 1.0+ |
|
Properties
Property | Action | IE | Mozilla | Netscape | Opera | Safari |
---|---|---|---|---|---|---|
cssRules
: CSSRuleList
Array of all rules nested within the rule block.
|
Show Details | no | 1.0+ | no | 9.0+ | 1.0+ |
|
||||||
media
: MediaList
Array of media types that the nested rules apply to.
|
Show Details | no | 1.0+ | no | 9.0+ | 1.0+ |
|
Functions
Method | Action | IE | Mozilla | Netscape | Opera | Safari | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
deleteRule(Number index) : void
Deletes the specified rule from the CSSRules array.
|
Show Details | no | 1.0+ | no | 9.0+ | no | ||||||||
Parameters
Returns
|
||||||||||||||
insertRule(String rule, Number index) : Object
Inserts the specified rule into the CSSRules array at the specified position.
|
Show Details | no | 1.0+ | no | 9.0+ | no | ||||||||
Parameters
Returns
|
Availability
HTML DOM Level 2|W3C