Penghitung Gaya , Atur Ulang Properti
Contoh
Ubah properti counter-reset:
document.body.style.counterReset = "section";
Definisi dan Penggunaan
Properti counterReset membuat atau mengatur ulang satu atau lebih penghitung.
Properti counterReset biasanya digunakan bersama dengan properti counterIncrement dan properti konten.
Dukungan Peramban
Property | |||||
---|---|---|---|---|---|
counterReset | Yes | Yes | Yes | Yes | Yes |
Sintaksis
Kembalikan properti counterReset:
object.style.counterReset
Setel properti counterReset:
object.style.counterReset = "none|name number|initial|inherit"
Nilai properti
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 |
Detail Teknis
Nilai Bawaan: | tidak ada |
---|---|
Nilai Kembali: | Sebuah String, mewakili properti counter-increment dari suatu elemen |
Versi CSS | CSS2 |
Objek Gaya