Gaya flexBasis Properti
Contoh
Atur panjang awal item fleksibel menjadi 200 piksel:
document.getElementById("myBlueDiv").style.flexBasis = "200px";
Definisi dan Penggunaan
Properti flexBasis menentukan panjang awal item fleksibel.
Catatan: Jika elemen bukan item fleksibel, properti flexBasis tidak akan berpengaruh.
Dukungan Peramban
Property | |||||
---|---|---|---|---|---|
flexBasis | Yes | 11.0 | Yes | 9.0 | Yes |
Sintaksis
Kembalikan properti flexBasis:
object.style.flexBasis
Setel properti flexBasis:
object.style.flexBasis = "number|auto|initial|inherit"
Nilai properti
Value | Description |
---|---|
number | A length unit, or percentage, specifying the initial length of the flexible item(s) |
auto | Default value. The length is equal to the length of the flexible item. If the item has no length specified, the length will be according to its content |
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: | mobil |
---|---|
Nilai Kembali: | Sebuah String, mewakili properti flex-basis dari suatu elemen |
Versi CSS | CSS3 |
Halaman Terkait
Referensi CSS: properti flex-basis
Referensi GAYA DOM HTML: properti fleksibel
Referensi GAYA DOM HTML: properti flexDirection
Referensi GAYA DOM HTML: properti flexFlow
Referensi GAYA DOM HTML: properti flexGrow
Referensi GAYA DOM HTML: properti flexShrink
Referensi GAYA DOM HTML: properti flexWrap
Objek Gaya