Properti isolasi CSS
Contoh
Buat konteks susun baru untuk elemen dengan id="e":
#e {
isolation: isolate;
}
Definisi dan Penggunaan
Properti isolation
menentukan apakah suatu elemen harus membuat konten susun baru.
Catatan: Properti isolation
ini berguna saat digunakan dengan
mode background-blend atau mode mix-blend.
Nilai bawaan: | mobil |
---|---|
Diwarisi: | tidak |
Animasi: | tidak. Baca tentang animasi |
Versi: kapan: | CSS3 |
Sintaks JavaScript: | objek .style.isolation="mengisolasi" |
Dukungan Peramban
Angka-angka dalam tabel menentukan versi browser pertama yang sepenuhnya mendukung properti.
Property | |||||
---|---|---|---|---|---|
isolation | 41.0 | 79.0 | 36.0 | Yes | 30.0 |
Sintaks CSS
isolation: auto|isolate|initial|inherit;
Nilai properti
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 |
Halaman Terkait
Referensi DOM HTML: Properti isolasi