Row Direction (Default)
Item 1
Item 2
Item 3
Understand the fundamentals of Flexbox axes and directions. This example shows how flex-direction controls which axis is the main axis and how items flow within flex containers.
justify-content
flex-grow
flex-shrink
flex-basis
align-items
align-content
align-self
align-items
align-content
align-self
justify-content
flex-grow
flex-shrink
flex-basis
flex-direction
determines the direction of the main axisjustify-content
- Controls spacing and alignment along the main axisflex-grow
- Applied to flex itemsflex-shrink
- Applied to flex itemsflex-basis
- Applied to flex itemsalign-items
- Controls how items align within their row/columnalign-content
- Controls how rows/columns align when items wrapalign-self
- Overrides align-items
for individual items