Styl flexBasis Właściwość
Przykład
Ustaw początkową długość elementu elastycznego na 200 pikseli:
document.getElementById("myBlueDiv").style.flexBasis = "200px";
Definicja i użycie
Właściwość flexBasis określa początkową długość elastycznego elementu.
Uwaga: Jeśli element nie jest elementem elastycznym, właściwość flexBasis nie ma żadnego efektu.
Obsługa przeglądarki
Property | |||||
---|---|---|---|---|---|
flexBasis | Yes | 11.0 | Yes | 9.0 | Yes |
Składnia
Zwróć właściwość flexBasis:
object.style.flexBasis
Ustaw właściwość flexBasis:
object.style.flexBasis = "number|auto|initial|inherit"
Wartości nieruchomości
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 |
Szczegóły techniczne
Domyślna wartość: | automatyczny |
---|---|
Wartość zwrotu: | String, reprezentujący właściwość flex-basis elementu |
Wersja CSS | CSS3 |
Powiązane strony
Odniesienie CSS: właściwość flex-basis
Odniesienie HTML DOM STYLE: właściwość flex
HTML DOM STYLE Reference: właściwość flexDirection
Odniesienie HTML DOM STYLE: właściwość flexFlow
Odniesienie HTML DOM STYLE: właściwość flexGrow
Odniesienie HTML DOM STYLE: właściwość flexShrink
Odniesienie HTML DOM STYLE: właściwość flexWrap
❮ Obiekt stylu