Vlastnost stylu flexDirection
Příklad
Změňte uspořádání směru flexibilních položek uvnitř prvku <div>:
document.getElementById("main").style.flexDirection = "column-reverse";
Definice a použití
Vlastnost flexDirection nastavuje nebo vrací směr flexibilních položek.
Poznámka: Pokud prvek není flexibilní položkou, vlastnost flexDirection nemá žádný vliv.
Podpora prohlížeče
Property | |||||
---|---|---|---|---|---|
flexDirection | Yes | 11.0 | Yes | 9.0 | Yes |
Syntax
Vraťte vlastnost flexDirection:
object.style.flexDirection
Nastavte vlastnost flexDirection:
object.style.flexDirection = "row|row-reverse|column|column-reverse|initial|inherit"
Hodnoty vlastností
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 |
Technické údaje
Výchozí hodnota: | řádek |
---|---|
Návratová hodnota: | Řetězec představující vlastnost flex-direction prvku |
Verze CSS | CSS3 |
Související stránky
CSS reference: vlastnost flex-direction
HTML DOM STYLE Reference: vlastnost flex
Odkaz na STYL DOM HTML: vlastnost flexBasis
Odkaz na STYL DOM HTML: vlastnost flexFlow
HTML DOM STYLE Reference: vlastnost flexGrow
Odkaz na STYL DOM HTML: vlastnost flexShrink
Odkaz na STYL DOM HTML: vlastnost flexWrap
❮ Objekt stylu