CSS flex-basis attribute of flexibleflex-basis Model
Instance
Set the initial length of the second elastic box element to 80 pixels:
- Div: nth-of-type (2) {flex-basis: 80px ;}
Browser support for effect Preview
The number in the table indicates the version number of the first browser that supports this attribute.
The number following-webkit-,-ms-, or-moz-is the first version that supports this prefix attribute.
Attribute |
|
|
|
|
|
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 attribute is used to set or retrieve the scale benchmark value of an Elastic box ..
NOTE: If an element is not an element of an Elastic box object, the flex-basis attribute does not work.
Default Value: |
Auto |
Inheritance: |
No |
Animations: |
Yes. See SS3 animation attributes and CSS3 animation instances. Effect Preview |
Version: |
CSS3 |
JavaScript Syntax: |
Object. Style. flexBasis = "200px" effect Preview |
CSS syntax flex-basis:
Number| Auto | initial | inherit; Attribute Value
Value |
Description |
Number |
Specifies the initial length of a flexible item, in unit or percentage. |
Auto |
Default value. The length is equal to the length of a flexible project. If the length of the project is not specified, the length is determined based on the content. |
Initial |
Set this property to its default value. SeeInitial. |
Inherit |
This attribute is inherited from the parent element. SeeInherit. |