Web4College

CSS flex-shrink property

src

Description

CSS flex-shrink determines how much the flex item should shrink to fill the remaining space relative to the other flex items.

Syntax

flex-shrink : +ve integer

Property values

+ve integerDefault

1

The flex items shrink to fill the free remaining space relative to the other items.

flex-shrink: 1;
Try it

+ve integer

0

The flex items do not shrink to fill the remaining space.

flex-shrink: 0;
Try it

Applicable to

It applies to flex items.