Flex html text font family

Font

flex-grow and flex-shrink : accept unitless value that serves as proportion. If an item has flex-grow or flex-shrink value, it grows or shrink.
If flex-shrink: 0 , it will not shrink but it will shrink from value of 1.

flex-basis

:It only works if the element is a flex item. It’s not width or height but more like proportion of its axis.
if flex-direction: row , this will take space based on x-axis and flex-direction: column , it will take space based on y-axis.

flex

: shorthand for flex-grow, flex-shrink and flex-basis combined.
** It is recommended that you use this shorthand property rather than set the individual properties.

  lang="ko">  charset="UTF-8">  http-equiv="X-UA-Compatible" content="IE=edge">  name="viewport" content="width=device-width, initial-scale=1.0"> .container  display: flex; height: 300px; margin: 10px; /* flex-direction: column; */ > .items  border: 2px solid black; border-radius: 6px; background-color: pink; margin: 10px; > .items:nth-child(1)  flex: 1; > .items:nth-child(2)  /* flex-basis: 200px; */ flex: 200px; > .items:nth-child(3)  flex: 1; > .items:nth-child(4)  flex: 1; > .items:nth-child(5)  flex: 1; >    class="container">  class="items">
class="items">
class="items">
class="items">
class="items">

flex-wrap

It’s good to use for responsive design!
If elements are flex item and have value of flex-wrap: wrap , flex items goes to the next line automatically when the screen gets smaller.

flex-flow

It’s a shorthand for the flex-direction and flex-wrap. The default value is row and nowrap.

/* example */ .container  flex-flow: column wrap; > 

Flexbox practice

  lang="ko">  charset="UTF-8">  http-equiv="X-UA-Compatible" content="IE=edge">  name="viewport" content="width=device-width, initial-scale=1.0">  rel="stylesheet" href="../reset.css"> body  display: flex; box-sizing: border-box; width: 100%; display: flex; flex-direction: column; > header  width: 100%; display: flex; justify-content: center; align-items: center; background-color: #2d3436; > nav  width: 96%; display: flex; justify-content: center; align-items: center; background-color: #dfe6e9; > nav ul  display: flex; flex-direction: row; align-items: center; justify-content: space-evenly; width: 92%; background-color: #74b9ff; margin: 0 20px; > ul li  width: 30%; background-color: #e84393; margin: 0 14px; > main  width: 100%; background-color: #dfe6e9; display: flex; flex-direction: row; justify-content: center; align-items: center; flex-wrap: wrap; > section  display: flex; width: 70%; justify-content: space-around; align-items: center; width: 72%; background-color: #00cec9; > article  width: 45%; background-color: #dfe6e9; margin: 20px; > aside  flex: 1; background-color: #636e72; > footer  width: 100%; background-color: #fdcb6e; > @media screen and (max-width: 1000px)  section  display: flex; width: 100%; flex-wrap: wrap; > article  width: 80%; > >       menu menu   menu menu      Lorem ipsum dolor sit amet, consectetur adipisicing elit. Obcaecati asperiores, saepe nihil nulla laborum eligendi rerum possimus ullam doloribus iure quis, quos soluta vero quas esse voluptatibus fuga numquam fugiat? Modi, quo! Aspernatur ullam sed maxime illum quisquam voluptatibus incidunt dolorum sint non fuga excepturi veniam ratione nihil, culpa temporibus reprehenderit aliquam voluptas eius obcaecati itaque atque aperiam odio. Deserunt. Lorem, ipsum dolor sit amet consectetur adipisicing elit. Sequi commodi provident delectus beatae dolorem explicabo fugit, maxime sit modi cum saepe dolores recusandae! Nostrum unde sequi, provident hic alias nisi. Corrupti provident blanditiis tempore. Magni facilis incidunt fugiat quis quasi corrupti cum ut laudantium eum, hic recusandae cupiditate consequatur, magnam, eligendi vero odio sit reprehenderit placeat dolores esse officia. Incidunt?  Lorem, ipsum dolor sit amet consectetur adipisicing elit. Sequi commodi provident delectus beatae dolorem explicabo fugit, maxime sit modi cum saepe dolores recusandae! Nostrum unde sequi, provident hic alias nisi. Corrupti provident blanditiis tempore. Magni facilis incidunt fugiat quis quasi corrupti cum ut laudantium eum, hic recusandae cupiditate consequatur, magnam, eligendi vero odio sit reprehenderit placeat dolores esse officia. Incidunt?  footer   

Источник

flex

Baseline is determined by this web feature being supported on the current and the previous major versions of major browsers.

The flex CSS shorthand property sets how a flex item will grow or shrink to fit the space available in its flex container.

Try it

Constituent properties

This property is a shorthand for the following CSS properties:

Syntax

/* Keyword values */ flex: auto; flex: initial; flex: none; /* One value, unitless number: flex-grow flex-basis is then equal to 0. */ flex: 2; /* One value, width/height: flex-basis */ flex: 10em; flex: 30%; flex: min-content; /* Two values: flex-grow | flex-basis */ flex: 1 30px; /* Two values: flex-grow | flex-shrink */ flex: 2 2; /* Three values: flex-grow | flex-shrink | flex-basis */ flex: 2 2 10%; /* Global values */ flex: inherit; flex: initial; flex: revert; flex: revert-layer; flex: unset; 

The flex property may be specified using one, two, or three values.