สไตล์เคาน์เตอร์รีเซ็ตคุณสมบัติ
ตัวอย่าง
เปลี่ยนคุณสมบัติการรีเซ็ตตัวนับ:
document.body.style.counterReset = "section";
ความหมายและการใช้งาน
คุณสมบัติ counterReset สร้างหรือรีเซ็ตตัวนับตั้งแต่หนึ่งตัวขึ้นไป
คุณสมบัติ counterReset มักจะใช้ร่วมกับคุณสมบัติ counterIncrement และคุณสมบัติเนื้อหา
รองรับเบราว์เซอร์
Property | |||||
---|---|---|---|---|---|
counterReset | Yes | Yes | Yes | Yes | Yes |
ไวยากรณ์
ส่งคืนคุณสมบัติการรีเซ็ตเคาน์เตอร์:
object.style.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 |
❮ สไตล์วัตถุ