CSS Pseudo-Property: counter-reset
[this page | pdf | back links]
The CSS (CSS2) counter-reset (pseudo-)property creates
or resets one or more CSS counters and is usually used in conjunction with the counter-increment
and content
pseudo-properties.
For example, a selector
taking the following form will reset the counter named ctr to 1 each time the relevant selector is selected
(here each time the page load comes across an <h1> element)
h1 { counter-reset: ctr; }
Property values (other
than inherit and initial) that can be
included in the pseudo-property include:
Value
|
Description
|
id value
|
The id of the
counter to be reset (created) and the value that the counter is to be
reset to on each occurrence of the selector (default value is 0)
|
none
|
(default). No counters
reset
|
Default Value:
|
none
|
JavaScript syntax:
|
e.g. object.style.counterReset="ctr"
|
Inherited:
|
No
|
Animatable:
|
No
|
NAVIGATION LINKS
Contents | Prev | Next | CSS Properties