Styl counterReset Property
Příklad
Změňte vlastnost counter-reset:
document.body.style.counterReset = "section";
Definice a použití
Vlastnost counterReset vytváří nebo resetuje jeden nebo více čítačů.
Vlastnost counterReset se obvykle používá společně s vlastností counterIncrement a vlastností content.
Podpora prohlížeče
Property | |||||
---|---|---|---|---|---|
counterReset | Yes | Yes | Yes | Yes | Yes |
Syntax
Vraťte vlastnost counterReset:
object.style.counterReset
Nastavte vlastnost counterReset:
object.style.counterReset = "none|name number|initial|inherit"
Hodnoty vlastností
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 |
Technické údaje
Výchozí hodnota: | žádný |
---|---|
Návratová hodnota: | Řetězec představující vlastnost counter-increment prvku |
Verze CSS | CSS2 |
❮ Objekt stylu