คุณสมบัติการแยก CSS
ตัวอย่าง
สร้างบริบทการซ้อนใหม่สำหรับองค์ประกอบด้วย id="e":
#e {
isolation: isolate;
}
ความหมายและการใช้งาน
คุณสมบัติisolation
กำหนดว่าองค์ประกอบต้องสร้างเนื้อหาที่ซ้อนกันใหม่หรือไม่
หมายเหตุ:คุณสมบัติisolation
นี้มีประโยชน์เมื่อใช้กับ
โหมด background-blendหรือ mix-blend-mode
ค่าเริ่มต้น: | รถยนต์ |
---|---|
รับการถ่ายทอด: | ไม่ |
เคลื่อนไหวได้: | ไม่. อ่านเกี่ยวกับแอนิเมชั่น |
รุ่น: | CSS3 |
ไวยากรณ์ JavaScript: | วัตถุ .style.isolation="isolate" |
รองรับเบราว์เซอร์
ตัวเลขในตารางระบุเบราว์เซอร์รุ่นแรกที่สนับสนุนคุณสมบัติอย่างสมบูรณ์
Property | |||||
---|---|---|---|---|---|
isolation | 41.0 | 79.0 | 36.0 | Yes | 30.0 |
ไวยากรณ์ CSS
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 |
หน้าที่เกี่ยวข้อง
การอ้างอิง HTML DOM: คุณสมบัติการแยก