Language References
DOM Level 2 Specification.
Represents the declaration ( such as 'font-family: helvetica' ) and its selector ( such as 'H1' ) of a cascading style sheet ( CSS ).
A rule defines a set of CSS attributes applied to a set of HTML elements.
rule Members
The following example sets a single rule.
<style>
h1 {color: red;}
</style>
Assuming this is the only style sheet in the document, the following code will return the rule declared above.
oRule=document.styleSheets ( 0 ).rules ( 0 )
rules