Page 156 - CSS
P. 156
Chapter 24: Flexible Box Layout (Flexbox)
Introduction
The Flexible Box module, or just 'flexbox' for short, is a box model designed for user interfaces,
and it allows users to align and distribute space among items in a container such that elements
behave predictably when the page layout must accommodate different, unknown screen sizes. A
flex container expands items to fill available space and shrinks them to prevent overflow.
Syntax
• display: flex;
• flex-direction: row | row-reverse | column | column-reverse;
• flex-wrap: nowrap | wrap | wrap-reverse;
• flex-flow: <'flex-direction'> || <'flex-wrap'>
• justify-content: flex-start | flex-end | center | space-between | space-around;
• align-items: flex-start | flex-end | center | baseline | stretch;
• align-content: flex-start | flex-end | center | space-between | space-around | stretch;
• order: <integer>;
• flex-grow: <number>; /* default 0 */
• flex-shrink: <number>; /* default 1 */
• flex-basis: <length> | auto; /* default auto */
• flex: none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ]
• align-self: auto | flex-start | flex-end | center | baseline | stretch;
Remarks
Vender Prefixes
• display: -webkit-box; /* Chrome <20 */
• display: -webkit-flex; /* Chrome 20+ */
• display: -moz-box; /* Firefox */
• display: -ms-flexbox; /* IE */
• display: flex; /* Modern browsers */
Resources
• A Complete Guide to Flexbox
• Solved by Flexbox
• What the Flexbox?!
• Flexbox in 5 minutes
• Flexbugs
https://riptutorial.com/ 134

