CSS flex-shrink attribute of Flexble elastic box model, flexshrinkcss3
Instance
Shrink the second element to 1/3 of other elements:
Effect Preview
div:nth-of-type(2){flex-shrink:3;}
Browser support
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-shrink |
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-shrink attribute is used to set or retrieve the shrinkage ratio of an Elastic box ..
NOTE: If an element is not an element of an Elastic box object, the flex-shrink attribute does not work.
| Default Value: |
1 |
| Inheritance: |
No |
| Animations: |
Yes. See SS3 animation attributes and CSS3 animation instances. Effect Preview |
| Version: |
CSS3 |
| JavaScript Syntax: |
Object. Style. flexShrink = "5" effect Preview |
CSS syntax flex-shrink:
Number| Initial | inherit; Attribute Value
| Value |
Description |
| Number |
A number that specifies the number of projects that will be scaled down for other flexible projects. The default value is 0. |
| Initial |
Set this property to its default value. SeeInitial. |
| Inherit |
This attribute is inherited from the parent element. SeeInherit. |