Propriedade de estilo counterIncrement
Exemplo
Altere a propriedade counterIncrement:
document.getElementById("myH1").style.counterIncrement = "subsection";
Definição e uso
A propriedade counterIncrement incrementa um ou mais valores de contador.
A propriedade counterIncrement geralmente é usada em conjunto com a propriedade counterReset e a propriedade content.
Suporte ao navegador
Property | |||||
---|---|---|---|---|---|
counterIncrement | Yes | Yes | Yes | Yes | Yes |
Sintaxe
Retorne a propriedade counterIncrement:
object.style.counterIncrement
Defina a propriedade counterIncrement:
object.style.counterIncrement = "none|id|initial|inherit"
Valores de propriedade
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 |
Detalhes técnicos
Valor padrão: | Nenhum |
---|---|
Valor de retorno: | Uma String, representando a propriedade counter-increment de um elemento |
Versão CSS | CSS2 |
❮ Objeto de estilo