Gaya flexShrink Properti
Contoh
Biarkan elemen DIV biru menyusut lima kali lebih banyak daripada item fleksibel lainnya:
document.getElementById("myBlueDiv".style.flexShrink = "5";
Definisi dan Penggunaan
Properti flexShrink menentukan bagaimana item akan menyusut relatif terhadap item fleksibel lainnya di dalam wadah yang sama.
Catatan: Jika elemen bukan item yang fleksibel, properti flexShrink tidak akan berpengaruh.
Dukungan Peramban
Property | |||||
---|---|---|---|---|---|
flexShrink | Yes | 11.0 | Yes | 9.0 | Yes |
Sintaksis
Kembalikan properti flexShrink:
object.style.flexShrink
Setel properti flexShrink:
object.style.flexShrink = "number|initial|inherit"
Nilai properti
Value | Description |
---|---|
number | A number specifying how much the item will shrink relative to the rest of the flexible items. Default 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 |
Detail Teknis
Nilai Bawaan: | 1 |
---|---|
Nilai Kembali: | Sebuah String, mewakili properti flex-shrink dari suatu elemen |
Versi CSS | CSS3 |
Halaman Terkait
Referensi CSS: properti flex-shrink
Referensi GAYA DOM HTML: properti fleksibel
Referensi GAYA DOM HTML: properti flexBasis
Referensi GAYA DOM HTML: properti flexDirection
Referensi GAYA DOM HTML: properti flexFlow
Referensi GAYA DOM HTML: properti flexGrow
Referensi GAYA DOM HTML: properti flexWrap
Objek Gaya