Style counterIncrement Property
Exemple
Modifiez la propriété counterIncrement :
document.getElementById("myH1").style.counterIncrement = "subsection";
Définition et utilisation
La propriété counterIncrement incrémente une ou plusieurs valeurs de compteur.
La propriété counterIncrement est généralement utilisée avec la propriété counterReset et la propriété content.
Prise en charge du navigateur
Property | |||||
---|---|---|---|---|---|
counterIncrement | Yes | Yes | Yes | Yes | Yes |
Syntaxe
Renvoyez la propriété counterIncrement :
object.style.counterIncrement
Définissez la propriété counterIncrement :
object.style.counterIncrement = "none|id|initial|inherit"
Valeurs de propriété
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 |
Détails techniques
Valeur par défaut: | rien |
---|---|
Valeur de retour : | Une chaîne, représentant la propriété de contre-incrémentation d'un élément |
Version CSS | CSS2 |
❮ Objet de style