Visit Mozilla.org

CSS:counter-reset

From MDC

« CSS Reference « CSS Reference:Mozilla Extensions

[edit] Summary

counter-reset is used to reset CSS Counters to a given value.

[edit] Syntax

counter-reset: [<identifier> <integer>?]+ | inherit | none

[edit] Values

identifier
The name of the counter to reset.
integer
The value to reset the counter to on each occurrence of the element. Defaults to 0 if not given.

You may specify as many counters to reset as you want, each separated by a space.

[edit] Related properties

[edit] Examples

h1 {
  counter-reset: chapter section 1 page;
  /* Sets the chapter and page counters to 0
     and the section counter to 1. */
}

[edit] Notes

[edit] Specifications

[edit] Browser compatibility

[edit] See also

CSS Counters, counter-increment