Vlastnost stylu flexBasis
Příklad
Nastavte počáteční délku flexibilní položky na 200 pixelů:
document.getElementById("myBlueDiv").style.flexBasis = "200px";
Definice a použití
Vlastnost flexBasis určuje počáteční délku flexibilní položky.
Poznámka: Pokud prvek není flexibilní položkou, vlastnost flexBasis nemá žádný vliv.
Podpora prohlížeče
Property | |||||
---|---|---|---|---|---|
flexBasis | Yes | 11.0 | Yes | 9.0 | Yes |
Syntax
Vraťte vlastnost flexBasis:
object.style.flexBasis
Nastavte vlastnost flexBasis:
object.style.flexBasis = "number|auto|initial|inherit"
Hodnoty vlastností
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 |
Technické údaje
Výchozí hodnota: | auto |
---|---|
Návratová hodnota: | Řetězec představující vlastnost flex-base prvku |
Verze CSS | CSS3 |
Související stránky
CSS reference: vlastnost flex-base
HTML DOM STYLE Reference: vlastnost flex
HTML DOM STYLE Reference: vlastnost flexDirection
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