CSSStyleSheet : StyleSheet
Return to: HTML DOM Level 2 index

CSS style sheet.

Platform Support

IE Mozilla Netscape Opera Safari Chrome
6.0+ 1.0+ no 9.0+ 1.0+ no

Constructors

Constructor Action IE Mozilla Netscape Opera Safari Chrome
CSSStyleSheet Constructor() : CSSStyleSheet
CSS style sheet.
Show Details 6.0+ 1.0+ no 9.0+ 1.0+ no

CSSStyleSheet() : CSSStyleSheet

CSS style sheet.

Returns
CSSStyleSheet

Visibility
internal

Properties

Property Action IE Mozilla Netscape Opera Safari Chrome
cssRules : CSSRuleList
Array of CSSRule objects in the style sheet.
Show Details no 1.0+ no 9.0+ 1.0+ no

For examples, see the quirksmode test page:

http://www.quirksmode.org/dom/tests/stylesheets.html

Availability

HTML DOM Level 2|W3C

ownerRule : CSSRule
Specifies the CSSImportRule object for imported style sheets. Specifies null if the style sheet is not imported.
Show Details 6.0+ 1.0+ no 9.0+ 1.0+ no
Availability

HTML DOM Level 2|W3C

Functions

Method Action IE Mozilla Netscape Opera Safari Chrome
deleteRule(Number index) : void
Deletes a CSS rule at the specified position in the CSSRules array.
Show Details no 1.0+ no 9.0+ no no

Parameters
Number index Position of the rule in the CSSRules array.

Returns
void

For examples, see the quirksmode test page:

http://www.quirksmode.org/dom/tests/stylesheet_change.html

See Also

CSSStyleSheet.insertRule

Availability

HTML DOM Level 2|W3C

insertRule(String rule, Number index) : Object
Inserts the specified rule into the style sheet at the specified position.
Show Details no 1.0+ no 9.0+ no no

Parameters
String rule Complete text for the CSS rule to be inserted.
Number index Position in the CSSRules array where the rule is to be inserted.

Returns
Object

For examples, see the quirksmode test page:

http://www.quirksmode.org/dom/tests/stylesheet_change.html

See Also

CSSStyleSheet.deleteRule

Availability

HTML DOM Level 2|W3C

References

StyleSheet

Availability

HTML DOM Level 2|W3C

text_javascript aptana_docs