Overview of CSS Flexbox Layout
Flexible Box (flex) is a layout model designed to provide a more efficient way to align and distribute space among items in a container, even when their size is unknown or dynamic.
Key concepts:
- Flex Container: The element that has
display: flex(orinline-flex) applied to it. - Flex Items: All direct children of a flex container.
- Main Axis: The primary axis along which items are laid out (determined by
flex-direction). - Cross Axis: The axis perpendicular to the main axis.