スタイルcounterIncrementプロパティ
例
counterIncrementプロパティを変更します。
document.getElementById("myH1").style.counterIncrement = "subsection";
定義と使用法
counterIncrementプロパティは、1つ以上のカウンター値をインクリメントします。
counterIncrementプロパティは通常、counterResetプロパティおよびcontentプロパティと一緒に使用されます。
ブラウザのサポート
Property | |||||
---|---|---|---|---|---|
counterIncrement | Yes | Yes | Yes | Yes | Yes |
構文
counterIncrementプロパティを返します。
object.style.counterIncrement
counterIncrementプロパティを設定します。
object.style.counterIncrement = "none|id|initial|inherit"
プロパティ値
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 |
技術的な詳細
デフォルト値: | なし |
---|---|
戻り値: | 要素のカウンターインクリメントプロパティを表す文字列 |
CSSバージョン | CSS2 |
❮スタイルオブジェクト