Gaya flexDirection Properti
Contoh
Atur ulang arah item fleksibel di dalam elemen <div>:
document.getElementById("main").style.flexDirection = "column-reverse";
Definisi dan Penggunaan
Properti flexDirection menetapkan atau mengembalikan arah item fleksibel.
Catatan: Jika elemen bukan item fleksibel, properti flexDirection tidak akan berpengaruh.
Dukungan Peramban
Property | |||||
---|---|---|---|---|---|
flexDirection | Yes | 11.0 | Yes | 9.0 | Yes |
Sintaksis
Kembalikan properti flexDirection:
object.style.flexDirection
Setel properti flexDirection:
object.style.flexDirection = "row|row-reverse|column|column-reverse|initial|inherit"
Nilai properti
Value | Description |
---|---|
row | Default value. The flexible items are displayed horizontally, as a row |
row-reverse | Same as row, but in reverse order |
column | The flexible items are displayed vertically, as a column |
column-reverse | Same as column, but in reverse order |
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: | baris |
---|---|
Nilai Kembali: | Sebuah String, mewakili properti flex-direction dari sebuah elemen |
Versi CSS | CSS3 |
Halaman Terkait
Referensi CSS: properti flex-direction
Referensi GAYA DOM HTML: properti fleksibel
Referensi GAYA DOM HTML: properti flexBasis
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