Propriété CSS flex-wrap
Exemple
Faire emballer les éléments souples si nécessaire :
div {
display: flex;
flex-wrap: wrap;
}
Définition et utilisation
La flex-wrap
propriété spécifie si les éléments flexibles doivent être renvoyés à la ligne ou non.
Remarque : Si les éléments ne sont pas des éléments flexibles, la flex-wrap
propriété n'a aucun effet.
Valeur par défaut: | maintenant |
---|---|
Hérité: | non |
Animable : | non. En savoir plus sur l'animation |
Version: | CSS3 |
Syntaxe JavaScript : | objet .style.flexWrap="maintenant" |
Prise en charge du navigateur
Les nombres dans le tableau indiquent la première version du navigateur qui prend entièrement en charge la propriété.
Les nombres suivis de -webkit- ou -moz- spécifient la première version qui a fonctionné avec un préfixe.
Property | |||||
---|---|---|---|---|---|
flex-wrap | 29.0 21.0 -webkit- |
11.0 | 28.0 18.0 -moz- |
9.0 6.1 -webkit- |
17.0 |
Syntaxe CSS
flex-wrap: nowrap|wrap|wrap-reverse|initial|inherit;
Valeurs de propriété
Value | Description | Play it |
---|---|---|
nowrap | Default value. Specifies that the flexible items will not wrap | |
wrap | Specifies that the flexible items will wrap if necessary | |
wrap-reverse | Specifies that the flexible items will wrap, if necessary, 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 |
Pages connexes
Tutoriel CSS : Boîte flexible CSS
Référence CSS : propriété flex
Référence CSS : propriété flex-flow
Référence CSS : propriété flex-direction
Référence CSS : propriété flex-basis
Référence CSS : propriété flex-grow
Référence CSS : propriété flex-shrink
Référence HTML DOM : propriété flexWrap