การแยกสไตล์คุณสมบัติ
ตัวอย่าง
สร้างบริบทการซ้อนใหม่สำหรับองค์ประกอบด้วย id="d":
document.getElementById("d").style.isolation = "isolate";
ความหมายและการใช้งาน
คุณสมบัติการแยกกำหนดว่าองค์ประกอบต้องสร้างเนื้อหาที่ซ้อนกันใหม่หรือไม่
รองรับเบราว์เซอร์
ตัวเลขในตารางระบุเบราว์เซอร์รุ่นแรกที่สนับสนุนคุณสมบัติอย่างสมบูรณ์
Property | |||||
---|---|---|---|---|---|
isolation | 41.0 | 79.0 | 36.0 | Yes | 30.0 |
ไวยากรณ์
ส่งคืนคุณสมบัติการแยก:
object.style.isolation
ตั้งค่าคุณสมบัติการแยก:
object.style.isolation = "auto|isolate|initial|inherit"
มูลค่าทรัพย์สิน
Value | Description |
---|---|
auto | Default. A new stacking context is created only if one of the properties applied to the element requires it |
isolate | A new stacking context must be created |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
รายละเอียดทางเทคนิค
ค่าเริ่มต้น: | รถยนต์ |
---|---|
เวอร์ชัน CSS | CSS3 |
หน้าที่เกี่ยวข้อง
การอ้างอิง CSS: คุณสมบัติการแยก
❮ สไตล์วัตถุ