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