css what does display flex do code example

Example 1: css flexbox syntax

Display: flex 
Flex-direction: row | row-reverse | column | column-reverse
align-self: flex-start | flex-end | center | baseline | stretch
justify-content: start |  center | space-between | space-around | space-evenly

Example 2: display flex css

.class {
  display: flex;
}

/* use display: flex to turn CSS element into a flexbox */

Example 3: css all flex properties

.item {
  flex-shrink: 3; /* default 1 */
}

Example 4: css all flex properties

.item {
  flex-grow: 4; /* default 0 */
}

Example 5: flexbox in css

.container {
  align-items: stretch | flex-start | flex-end | center | baseline | first baseline | last baseline | start | end | self-start | self-end + ... safe | unsafe;
}

Tags:

Css Example