Represents a media rule in a CSS style sheet.
Browser/User Agent Support
| IE | Mozilla | Netscape | Opera | Safari | Netscapte | no | 1.0+ | no | 9.0+ | 1.0+ | no |
|---|
Constructors
| Constructor | IE | Mozilla | Netscape | Opera | Safari | Netscapte |
|---|---|---|---|---|---|---|
Represents a media rule in a CSS style sheet. | no | 1.0+ | no | 9.0+ | 1.0+ | no |
Properties
| Property | IE | Mozilla | Netscape | Opera | Safari | Netscapte |
|---|---|---|---|---|---|---|
Array of all rules nested within the rule block. | no | 1.0+ | no | 9.0+ | 1.0+ | no |
Array of media types that the nested rules apply to. | no | 1.0+ | no | 9.0+ | 1.0+ | no |
Methods
| Method | IE | Mozilla | Netscape | Opera | Safari | Netscapte |
|---|---|---|---|---|---|---|
Deletes the specified rule from the CSSRules array. | no | 1.0+ | no | 9.0+ | no | no |
Inserts the specified rule into the CSSRules array at the specified position. | no | 1.0+ | no | 9.0+ | no | no |
Availability
HTML DOM Level 2 | W3C
Constructor Detail
Property Detail
CSSRuleList cssRules - read only
Array of all rules nested within the rule block.
-
For examples, see the quirksmode test page:
- Availability
HTML DOM Level 2 | W3C
MediaList media - read only
Array of media types that the nested rules apply to.
- Availability
HTML DOM Level 2 | W3C
Method Detail
deleteRule(Number index) : void
Deletes the specified rule from the CSSRules array.
| Number | index | Position in the CSSRules array where the rule to be deleted is located. |
-
For examples, see the quirksmode test page:
- See Also
- Availability
HTML DOM Level 2 | W3C
insertRule(String rule, Number index) : Object
Inserts the specified rule into the CSSRules array at the specified position.
| String | rule | Rule to insert. |
| Number | index | Position to insert the rule in the CSSRules array. |
-
For examples, see the quirksmode test page:
- See Also
- Availability
HTML DOM Level 2 | W3C
