JavaScripture
Contribute via GitHub Feedback

JavaScript CSSStyleSheet : StyleSheet

Represents a css style sheet. Use the document.styleSheets property to get a list of all CSSStyleSheets for a document. Can be created by creating an HTMLStyleElement, adding it to the document, and then finding the CSSStyleSheet in document.styleSheets that has ownerNode equal to HTMLStyleElement.

Instance Properties

cssRules : CSSRuleList

ownerRule : CSSRule

Instance Methods

deleteRule(index : Number) : undefined

Example:

Run

Results:

 

insertRule(rule : String, index : Number) : Number

Example:

Run

Results: