Styl licznikaWłaściwość przyrostu
Przykład
Zmień właściwość counterIncrement:
document.getElementById("myH1").style.counterIncrement = "subsection";
Definicja i użycie
Właściwość counterIncrement zwiększa co najmniej jedną wartość licznika.
Właściwość counterIncrement jest zwykle używana razem z właściwością counterReset i właściwością content.
Obsługa przeglądarki
Property | |||||
---|---|---|---|---|---|
counterIncrement | Yes | Yes | Yes | Yes | Yes |
Składnia
Zwróć właściwość counterIncrement:
object.style.counterIncrement
Ustaw właściwość counterIncrement:
object.style.counterIncrement = "none|id|initial|inherit"
Wartości nieruchomości
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 |
Szczegóły techniczne
Domyślna wartość: | Żaden |
---|---|
Wartość zwrotu: | String, reprezentujący właściwość licznika przyrostu elementu |
Wersja CSS | CSS2 |
❮ Obiekt stylu