Search PI
Programming Infinity
Programming in a way to understand
Featured to Learn
- Get link
- Other Apps
Labels
CSS flex-basis Property
Example
Set the initial length of the second flex-item to 100 pixels:
div:nth-of-type(2) {
flex-basis: 100px;
}
flex-basis: 100px;
}
Definition and Usage
The flex-basis
property specifies the initial length of a flexible item.
We can take it as a minimum length for the flex-items.
Note: If the element is not a flexible item, the flex-basis
property has no effect.
Default value: | auto |
---|---|
Inherited: | no |
Animatable: | yes. |
Version: | CSS3 |
JavaScript syntax: | object.style.flexBasis="200px" |
- Inherited : "Inherited = no" means that it cannot takes (inherit) it's value from it's parent element.
- object - object in javascript means the element on which
flex-basis
is applied. - Animatable - "Animatable = yes" means that it can be animated with CSS
@keyframes
.
Browser Support
The numbers in the table specify the first browser version that fully supports the property.
Numbers followed by -webkit- or -moz- specify the first version that worked with a prefix.
Property | |||||
---|---|---|---|---|---|
flex-basis | 29.0 21.0 -webkit- |
11.0 | 28.0 18.0 -moz- |
9.0 6.1 -webkit- |
17.0 |
CSS Syntax
flex-basis: number|auto|initial|inherit;
Property Values
Value | Description | Play it |
---|---|---|
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. | |
inherit | Inherits this property from its parent element. |
- Get link
- Other Apps
Tags
CSS Properties
Learn CSS
Most Reads
Thunkable #2 - How to show Admob Banner and Interestial Ads using Thunkable
- Get link
- Other Apps
Thunkable #4 - Introduction to advanced features | Webview Explanation
- Get link
- Other Apps
Thunkable #6 - Text Input and Label of User Interface full and simple explanation with use
- Get link
- Other Apps
How to use Switch in Thunkable | Designer and Blocks Clear Explanation
- Get link
- Other Apps
HTML #11 - Tables in HTML and it's properties #part1
- Get link
- Other Apps
How to use Alert in Thunkable | Designer and Blocks clear explanation
- Get link
- Other Apps
Android #11 - ScrollView | Adding Relative Layout to ScrollView | Calendar #3
- Get link
- Other Apps
HTML #9 - HTML Images and it's attributes Introduction, Uses and How to use
- Get link
- Other Apps
HTML #8 - HTML Text Formatting, Uses and How to Use
- Get link
- Other Apps
Android Studio #2 - Button's Introduction and uses
- Get link
- Other Apps
Comments
Post a Comment