Urutan gaya Properti
Contoh
Atur urutan item fleksibel:
document.getElementById("myRedDIV").style.order = "4";
document.getElementById("myBlueDIV").style.order = "3";
document.getElementById("myGreenDIV").style.order = "1";
document.getElementById("myPinkDIV").style.order = "2";
Definisi dan Penggunaan
Properti pesanan menentukan urutan item fleksibel relatif terhadap item fleksibel lainnya di dalam wadah yang sama.
Catatan: Jika elemen bukan item yang fleksibel, properti pesanan tidak akan berpengaruh.
Dukungan Peramban
Property | |||||
---|---|---|---|---|---|
order | Yes | 12.0 | Yes | Yes | Yes |
Sintaksis
Kembalikan properti pesanan:
object.style.order
Setel properti pesanan:
object.style.order = "number|initial|inherit"
Nilai properti
Value | Description |
---|---|
number | Default value 0. Specifies the order for the flexible item |
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 urutan dari suatu elemen |
Versi CSS | CSS3 |
Halaman Terkait
Referensi CSS: memesan properti
Referensi GAYA DOM HTML: properti alignContent
Referensi GAYA DOM HTML: properti alignItems
Referensi GAYA DOM HTML: properti alignSelf
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 flexShrink
Referensi GAYA DOM HTML: properti flexWrap
Objek Gaya