Propiedad de estilo flexBasis
Ejemplo
Establezca la longitud inicial de un elemento flexible en 200 píxeles:
document.getElementById("myBlueDiv").style.flexBasis = "200px";
Definición y uso
La propiedad flexBasis especifica la longitud inicial de un elemento flexible.
Nota: si el elemento no es un artículo flexible, la propiedad flexBasis no tiene efecto.
Compatibilidad con navegador
Property | |||||
---|---|---|---|---|---|
flexBasis | Yes | 11.0 | Yes | 9.0 | Yes |
Sintaxis
Devuelve la propiedad flexBasis:
object.style.flexBasis
Establezca la propiedad flexBasis:
object.style.flexBasis = "number|auto|initial|inherit"
Valores de propiedad
Value | Description |
---|---|
number | A length unit, or percentage, specifying the initial length of the flexible item(s) |
auto | Default value. The length is equal to the length of the flexible item. If the item has no length specified, the length will be according to its content |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
Detalles técnicos
Valor por defecto: | auto |
---|---|
Valor devuelto: | Una cadena, que representa la propiedad de base flexible de un elemento |
Versión CSS | CSS3 |
páginas relacionadas
Referencia de CSS: propiedad de base flexible
Referencia HTML DOM STYLE: propiedad flex
Referencia HTML DOM STYLE: propiedad flexDirection
HTML DOM STYLE Referencia: propiedad flexFlow
Referencia HTML DOM STYLE: propiedad flexGrow
Referencia HTML DOM STYLE: propiedad flexShrink
HTML DOM STYLE Referencia: propiedad flexWrap
❮ Objeto de estilo