Instance
Set the initial length of the second elastic box element to 80 pixels:
- div : nth - of - type ( 2 " { flex - basis : 80px ;}
Effect Preview Browser support
The number in the table represents the version number of the first browser that supports the property.
The number immediately following the-webkit-,-ms-or-moz-is the first version that supports the prefix attribute.
Properties |
|
|
|
|
|
Flex-basis |
29.0 21.0-webkit- |
11.0 10.0-ms- |
28.0 18.0-moz- |
9.0 6.1-webkit- |
17.0 |
Definition and usage
The Flex-basis property is used to set or retrieve elastic box scaling datum values.
Note: The Flex-basis property does not work if the element is not an element of the elastic box object.
Default value: |
Auto |
inherit: |
no |
can be animated: |
Yes. See  SS3 animated Properties, CSS3 animated instances. Effect Preview |
version: |
CSS3 |
JavaScript Syntax: |
object. style.flexbasis= "200px" effect preview |
CSS Syntax flex-basis:
Number|auto|initial|inherit; property value
value |
Description |
number |
a unit of length or a percentage that specifies the initial length of a flexible project. |
auto |
default value. Length equals the length of the flexible item. If the item does not specify a length, the length is determined based on the content. |
initial |
Set this property to its default value. See initial . |
Inherit |
Inherit the property from the parent element. See inherit. |
CSS Flex-basis Properties of flexible elastic box model