flex auto code example

Example 1: flexbox container width of content

display: inline-flex;

Example 2: flex: syntex

flex: none                                            /* value 'none' case */
flex: <'flex-grow'>                                   /* One value syntax, variation 1 */
flex: <'flex-basis'>                                  /* One value syntax, variation 2 */
flex: <'flex-grow'> <'flex-basis'>                    /* Two values syntax, variation 1 */
flex: <'flex-grow'> <'flex-shrink'>                   /* Two values syntax, variation 2 */
flex: <'flex-grow'> <'flex-shrink'> <'flex-basis'>    /* Three values syntax */
flex: inherit

Example 3: flex parameters

flex: none | [ <'flex-grow'> <'flex-shrink'>? || <'flex-basis'> ]

Example 4: what does flex do

The flex CSS property sets how a flex item will grow or shrink to fit the space
available in its flex container. It is a shorthand for flex-grow , flex-shrink ,
and flex-basis .

Tags:

Html Example