flex-basis

This is the base size of the item before growth or shrink is applied.
  • By default it is auto, which takes the natural size of the content or the defined width/height.
  • It can be a value in px, %, auto, rem, em, etc.

Example

In this example, we can see how each item takes its width according to the value assigned through the flex-basis property.

ResultLive
html
css