XML DOM CSSStyleSheet Object
- Previous page DOM CSSStyleRule
- Next page DOM Comment
CSSStyleSheet-object
CSSStyleSheet-object
CSS-stijltabellen bestaan uit CSS-regels die kunnen worden bewerkt met het CSSRule-object. Het CSSStyleSheet-object maakt het mogelijk om stijltabelregels te zoeken, in te voegen en te verwijderen.
U kunt de lijst van stijltabellen van het gegeven document verkrijgen door de eigenschap document.styleSheets te gebruiken (een verzameling van stijltabelobjecten).
Eigenschappen van het CSSStyleRule-object
- cssRules
- Retourneert alle CSS-regels in de stijltabel in de vorm van een array.
- uitgeschakeld
- Deze eigenschap geeft aan of de huidige stijltabel is toegepast. Als dit true is, wordt de stijltabel uitgeschakeld en kan deze niet worden toegepast op het document. Als dit false is, wordt de stijltabel geopend en kan deze worden toegepast op het document.
- href
- Returns the location (URL) of the style sheet, or null if it is an inline style sheet.
- media
- Specifies the target medium for the expected style information.
- ownerNode
- Returns the node associated with the style sheet that links it to the document.
- ownerRule
- If the style sheet comes from an @import rule, the ownerRule property will contain CSSImportRule.
- parentStyleSheet
- Returns the style sheet containing the style sheet (if any).
- title
- Returns the title of the current style sheet. The title can be specified by referencing the title attribute of the <style> or <link> element of the style sheet.
- type
- Specifies the language of the style sheet. Represented as MIME type, the type of CSS style sheet is "text/css".
CSSStyleRule object methods
Method | Description |
---|---|
addRule() | A specific to IE method for adding a rule to a style sheet. |
deleteRule() | The DOM standard method for deleting a rule from a specified position. |
insertRule() | The DOM standard method for inserting a new rule into the style sheet. |
removeRule() | A specific to IE method for deleting a rule. |
Related pages
XML DOM Reference Manual:CSSRule object
- Previous page DOM CSSStyleRule
- Next page DOM Comment