Propriété de style flexGrow
Exemple
Laissez l'élément DIV bleu devenir cinq fois plus large que le reste des éléments flexibles :
document.getElementById("myBlueDiv").style.flexGrow = "5";
Définition et utilisation
La propriété flexGrow spécifie la croissance de l'élément par rapport au reste des éléments flexibles à l'intérieur du même conteneur.
Remarque : Si l'élément n'est pas un élément flexible, la propriété flexGrow n'a aucun effet.
Prise en charge du navigateur
Property | |||||
---|---|---|---|---|---|
flexGrow | Yes | 11.0 | Yes | 9.0 | Yes |
Syntaxe
Renvoyez la propriété flexGrow :
object.style.flexGrow
Définissez la propriété flexGrow :
object.style.flexGrow = "number|initial|inherit"
Valeurs de propriété
Value | Description |
---|---|
number | A number specifying how much the item will grow relative to the rest of the flexible items. Default value is 0 |
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: | 0 |
---|---|
Valeur de retour : | Une chaîne, représentant la propriété flex-grow d'un élément |
Version CSS | CSS3 |
Pages connexes
Référence CSS : propriété flex-grow
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é flexDirection
Référence HTML DOM STYLE : propriété flexFlow
Référence HTML DOM STYLE : propriété flexShrink
Référence HTML DOM STYLE : propriété flexWrap
❮ Objet de style