Propriété flexDirection de style
Exemple
Réorganisez la direction des éléments flexibles à l'intérieur de l'élément <div> :
document.getElementById("main").style.flexDirection = "column-reverse";
Définition et utilisation
La propriété flexDirection définit ou renvoie la direction des éléments flexibles.
Remarque : Si l'élément n'est pas un élément flexible, la propriété flexDirection n'a aucun effet.
Prise en charge du navigateur
Property | |||||
---|---|---|---|---|---|
flexDirection | Yes | 11.0 | Yes | 9.0 | Yes |
Syntaxe
Renvoyez la propriété flexDirection :
object.style.flexDirection
Définissez la propriété flexDirection :
object.style.flexDirection = "row|row-reverse|column|column-reverse|initial|inherit"
Valeurs de propriété
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 |
Détails techniques
Valeur par défaut: | ligne |
---|---|
Valeur de retour : | Une chaîne, représentant la propriété flex-direction d'un élément |
Version CSS | CSS3 |
Pages connexes
Référence CSS : propriété flex-direction
Référence HTML DOM STYLE : propriété flex
Référence HTML DOM STYLE : propriété flexBasis
Référence HTML DOM STYLE : propriété flexFlow
Référence HTML DOM STYLE : propriété flexGrow
Référence HTML DOM STYLE : propriété flexShrink
Référence HTML DOM STYLE : propriété flexWrap
❮ Objet de style