Style counterIncrement Property
Esempio
Modificare la proprietà counterIncrement:
document.getElementById("myH1").style.counterIncrement = "subsection";
Definizione e utilizzo
La proprietà counterIncrement incrementa uno o più valori del contatore.
La proprietà counterIncrement viene in genere utilizzata insieme alla proprietà counterReset e alla proprietà content.
Supporto browser
Property | |||||
---|---|---|---|---|---|
counterIncrement | Yes | Yes | Yes | Yes | Yes |
Sintassi
Restituisce la proprietà counterIncrement:
object.style.counterIncrement
Imposta la proprietà counterIncrement:
object.style.counterIncrement = "none|id|initial|inherit"
Valori di proprietà
Value | Description |
---|---|
none | Default value. No counters will be incremented |
id number | The id defines which counter that should be incremented. The number sets how much the counter will increment on each occurrence of the selector. The default increment is 1. 0 or negative values, are allowed. If the id refers to a counter that has not been initialized by counter-reset, the default initial 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