Style counterReset Property
Esempio
Modificare la proprietà di ripristino del contatore:
document.body.style.counterReset = "section";
Definizione e utilizzo
La proprietà counterReset crea o reimposta uno o più contatori.
La proprietà counterReset viene in genere utilizzata insieme alla proprietà counterIncrement e alla proprietà content.
Supporto browser
Property | |||||
---|---|---|---|---|---|
counterReset | Yes | Yes | Yes | Yes | Yes |
Sintassi
Restituisce la proprietà counterReset:
object.style.counterReset
Imposta la proprietà counterReset:
object.style.counterReset = "none|name number|initial|inherit"
Valori di proprietà
Value | Description |
---|---|
none | Default value. No counters will be reset |
name | The name defines which counter that should be reset |
number | The id defines which counter that should be reset. The number sets the value the counter is set to on each occurrence of the selector. The default reset value is 0 |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
Dettagli tecnici
Valore di default: | nessuno |
---|---|
Valore di ritorno: | Una stringa, che rappresenta la proprietà del contatore di incremento di un elemento |
Versione CSS | CSS2 |
❮ Oggetto stile