Gaya flexGrow Properti
Contoh
Biarkan elemen DIV biru tumbuh lima kali lebih lebar dari item fleksibel lainnya:
document.getElementById("myBlueDiv").style.flexGrow = "5";
Definisi dan Penggunaan
Properti flexGrow menentukan seberapa banyak item akan tumbuh relatif terhadap item fleksibel lainnya di dalam wadah yang sama.
Catatan: Jika elemennya bukan item yang fleksibel, properti flexGrow tidak akan berpengaruh.
Dukungan Peramban
Property | |||||
---|---|---|---|---|---|
flexGrow | Yes | 11.0 | Yes | 9.0 | Yes |
Sintaksis
Kembalikan properti flexGrow:
object.style.flexGrow
Setel properti flexGrow:
object.style.flexGrow = "number|initial|inherit"
Nilai properti
Value | Description |
---|---|
number | A number specifying how much the item will grow 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: | 0 |
---|---|
Nilai Kembali: | Sebuah String, mewakili properti flex-grow dari suatu elemen |
Versi CSS | CSS3 |
Halaman Terkait
Referensi CSS: properti flex-grow
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 flexShrink
Referensi GAYA DOM HTML: properti flexWrap
Objek Gaya