type property (rule objects)
Retrieves an integer value that identifies the type of the CSS rule represented by the current CSSRule object.
Note: The type property is supported in Internet Explorer from version 9.
You can find the related objects in the Supported by objects section below.
This property is read-only.
Integer that represents the type of the represented rule.
Predefined constants are available for the possible values of this property, in the scope of the CSSRule object (CSSRule.UNKNOWN_RULE). For further details, see the page for the CSSRule object.
One of the following values (the value of a predefined constant appears in parentheses after the constant):
|The type of the represented rule is unknown.|
|The represented rule is a style rule.|
|The represented rule is a @charset rule.|
|The represented rule is an @import rule.|
|The represented rule is a @media rule.|
|The represented rule is a @font-face rule.|
|The represented rule is a @page rule.|
Default: this property has no default value.
Example HTML code 1:
This example illustrates the use of the type property:
Did you find this example helpful?
User Contributed Comments