Właściwość resetowania licznika stylu
Przykład
Zmień właściwość resetowania licznika:
document.body.style.counterReset = "section";
Definicja i użycie
Właściwość counterReset tworzy lub resetuje jeden lub więcej liczników.
Właściwość counterReset jest zwykle używana razem z właściwością counterIncrement i właściwością content.
Obsługa przeglądarki
Property | |||||
---|---|---|---|---|---|
counterReset | Yes | Yes | Yes | Yes | Yes |
Składnia
Zwróć właściwość counterReset:
object.style.counterReset
Ustaw właściwość counterReset:
object.style.counterReset = "none|name number|initial|inherit"
Wartości nieruchomości
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 |
Szczegóły techniczne
Domyślna wartość: | Żaden |
---|---|
Wartość zwrotu: | String, reprezentujący właściwość licznika przyrostu elementu |
Wersja CSS | CSS2 |
❮ Obiekt stylu