css study concluded (6) - flex layout

The last chapter describes some of the common attributes of css    https://www.cnblogs.com/woywan/p/12599827.html

This part describes the layout about flex

 

What is flex layout, the layout that is flexible pouch

Common properties of the flexible pouch layout

1.display: flex; this sentence means that the box to be displayed in the form of flexible pouch, but also the use of a flexible pouch will write the code

2.flex-direction: row; the contents of decision box arrangement, row represents the horizontal from left to right, top to bottom, a vertical column arranged on behalf of, as is the inverse permutation followed by reverse, from right to left, from bottom to top on

      column;

      row-reverse;

      column-reverse;

3.flex-wrap: no-wrap; not wrap arrangement

     wrap; wrap arrangement

     wrap-reverse; wrap and oppositely oriented

4.justify-content: flex-start; decision level arrangement of the contents of the box, the box is located at the beginning of horizontal alignment

        center; decision level arrangement of the contents of the box, the box is located in the middle horizontal alignment

       flex-end; decision level arrangement of the contents of the box, the box is located horizontally aligned tail

      space-between; decision level arrangement of the contents of the box, the box is located in the left and right sides aligned horizontally arranged, such as a resilient div div there are two, then a left aligned, right aligned a

      space-around; the contents of the box determines the level of the arrangement, the left and right sides of the box blank positioned horizontally arranged

5.align-items: flex-start; vertical alignment mode decision box contents, the box is located at the beginning of vertical alignment

        center; decision box content vertical arrangement, located in the middle of the box vertically aligned

       flex-end; decision box content vertical arrangement, located in vertical alignment bottom of the box

      stretch; the default value

      baseline; vertical alignment mode decision box contents, the box is located in vertical alignment baseline

6.flex-shrink: the value; when the page is less than the width of the box content scaling default is 1, the scaling is not 0, the write in style attribute content

 

Guess you like

Origin www.cnblogs.com/woywan/p/12604196.html