CSS semua Properti
Contoh
Ubah semua properti yang diterapkan ke elemen atau induk elemen ke nilai awalnya:
div
{
background-color: yellow;
color: red;
all: initial;
}
Definisi dan Penggunaan
Properti all
mengatur ulang semua properti, selain dari unicode-bidi dan arah, ke nilai awal atau warisannya.
Nilai bawaan: | tidak ada |
---|---|
Diwarisi: | tidak |
Animasi: | tidak. Baca tentang animasi |
Versi: kapan: | CSS3 |
Sintaks JavaScript: | objek .style.all="awal" |
Dukungan Peramban
Angka-angka dalam tabel menentukan versi browser pertama yang sepenuhnya mendukung properti.
Property | |||||
---|---|---|---|---|---|
all | 37.0 | 79.0 | 27.0 | 9.1 | 24.0 |
Sintaks CSS
all: initial|inherit|unset;
Nilai properti
Value | Description |
---|---|
initial | Changes all the properties applied to the element or the element's parent to their initial value |
inherit | Changes all the properties applied to the element or the element's parent to their parent value |
unset | Changes all the properties applied to the element or the element's parent to their parent value if they are inheritable or to their initial value if not |