Styl flexDirection Właściwość
Przykład
Zmień kierunek elastycznych elementów wewnątrz elementu <div>:
document.getElementById("main").style.flexDirection = "column-reverse";
Definicja i użycie
Właściwość flexDirection ustawia lub zwraca kierunek elementów elastycznych.
Uwaga: Jeśli element nie jest elementem elastycznym, właściwość flexDirection nie ma żadnego efektu.
Obsługa przeglądarki
Property | |||||
---|---|---|---|---|---|
flexDirection | Yes | 11.0 | Yes | 9.0 | Yes |
Składnia
Zwróć właściwość flexDirection:
object.style.flexDirection
Ustaw właściwość flexDirection:
object.style.flexDirection = "row|row-reverse|column|column-reverse|initial|inherit"
Wartości nieruchomości
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 |
Szczegóły techniczne
Domyślna wartość: | wiersz |
---|---|
Wartość zwrotu: | String, reprezentujący właściwość flex-direction elementu |
Wersja CSS | CSS3 |
Powiązane strony
Dokumentacja CSS: właściwość flex-direction
Odniesienie HTML DOM STYLE: właściwość flex
Odniesienie HTML DOM STYLE: właściwość flexBasis
Odniesienie HTML DOM STYLE: właściwość flexFlow
Odniesienie HTML DOM STYLE: właściwość flexGrow
Odniesienie HTML DOM STYLE: właściwość flexShrink
Odniesienie HTML DOM STYLE: właściwość flexWrap
❮ Obiekt stylu