██ Micro Signal ███138 ★ 2605 ★ 7771██ donor egg IVF █ █ three generations of test tube baby gender test tube package selected surrogate boy born ██ ██ ███ surrogate birth surrogacy option package gender ████ IVF surrogacy boy ███ donor egg IVF surrogacy ██
Before you have seen flex-start
. This is to allow multi-line Flex project on Cross-Axis starting edge. They are arranged from top to bottom along the Cross-Axis. Thus Flex Flex project aligned top container.
flex-end
flex-end
And just flex-start
the opposite, so that multi-line Flex project against Cross-Axis end position. Flex to project from the bottom are arranged along the Cross-Axis, i.e. aligned with the bottom.
center
You guessed it, center
make multi-line Flex project in the middle of Cross-Axis. Flex centered in the container.
This is the last attribute Flex container. You now know how to use Flex container property. You can practice these attributes at work.
Flex project properties
order || flex-grow || flex-shrink || flex-basis
In the previous section, I explain their alignment properties Flex container.
Indeed beautiful. I think you also find the feeling. Now we turn our attention from the container to the Flex Flex project and its alignment attributes.
Like Flex container, align attribute can also be used in all of the Flex project. Then we started.
order
Flex allows to reorder items in a Flex container. Basically, you can change the order of items Flex, moving from one position to another.
This does not affect the source code. This also means that the position of the Flex project does not need to change the HTML source code. order
The default value of the property is 0
. It accepts a positive, you can also accept a negative value.
It is noteworthy that, Flex project based on order
reordered values. From the bottom to high.
To explain somehow need an example. Consider the following unordered list:
<ul>
<li>1</li> <li>2</li> <li>3</li> <li>4</li> </ul>
By default, all Flex project order
values are 0
. The use of front to the list of styles over. We see the results as follows:
Flex item is displayed in the HTML source code in order to display, Flex items 1
, 2
, 3
and 4
.
If for some reason, under the HTML documents without changing the source code, want from a Flex project 1
becomes final. Can not modify the HTML source document means that you can not change the HTML code:
<ul>
<li>2</li> <li>3</li> <li>4</li> <li>1</li> </ul>
This time it is necessary order
attributes. This time you need to put a Flex project's order
value is set to a value larger than the other Flex projects.
If you've used before z-index
property, you will be able to better understand the properties.
Li : Child-Nth (. 1) {
Order: . 1; / * set a value greater than zero * /
}
Flex project is a re-arrangement, arranged from low to high. Do not forget, by default, Flex 2,3,4 project order
value 0
. Now Flex project 1 order
value 1
.