Propriedade de redefinição do contador de estilo
Exemplo
Altere a propriedade counter-reset:
document.body.style.counterReset = "section";
Definição e uso
A propriedade counterReset cria ou redefine um ou mais contadores.
A propriedade counterReset geralmente é usada em conjunto com a propriedade counterIncrement e a propriedade content.
Suporte ao navegador
Property | |||||
---|---|---|---|---|---|
counterReset | Yes | Yes | Yes | Yes | Yes |
Sintaxe
Retorne a propriedade counterReset:
object.style.counterReset
Defina a propriedade counterReset:
object.style.counterReset = "none|name number|initial|inherit"
Valores de propriedade
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 |
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