2021-03-21

Element content distribution and details in block-level rows

__

The justify-content attribute is used on the flexible container layout to align items along the main axis (x)

The syntax of justify-content is as follows
justify-content: flex-start
flexible items move closer to the beginning of the line (left-aligned)
Insert picture description here
flex-end
flexible items are aligned to the end of the line (right-aligned)
Insert picture description here
center
flexible items are aligned in the center and
Insert picture description here
space-between
flexible items are evenly distributed on the line , And the spacing distance is equal, the spacing distance between the beginning and the end of the line is zero.
Insert picture description here
If there are only two flexible items, one at the beginning and the end of the line are shown in the figure:
Insert picture description here
space-around The
distance between the
Insert picture description here
beginning and the end of the line of the flexible item is half of the spacing, and the space- evenly distribution is evenly distributed.
The distance between the beginning and end of the flexible item is the same
Insert picture description here
as the distance between the flexible item.The above picture is a very intuitive demonstration of the 6 value effects and differences.
We can test the flexible layout operation by ourselves through the online example code
https://wow.techbrood. com/fiddle/17128

Guess you like

Origin blog.csdn.net/qq_56023114/article/details/115049856