Is this used correctly to display: flex?

Is this the right option?

Display: flex on <ul>, and then each <li>has a width in pixels or percent.

The main reason I want to use it is to use align-items: center(vertical alignment).

It seems to work well, and I cannot get it to work well with it, but it is wrong because I do not use any flex values ​​in the list items.

+4
source share
1 answer

, . , , flex: 0 1 auto ( flex: <flex-grow> <flex-shrink> <flex-basis>). , , , . , - (flex-grow: 0), (flex-shrink: 1), , , , (flex-basis: auto).

, : https://css-tricks.com/snippets/css/a-guide-to-flexbox/

, W3, , http://www.w3.org/TR/css3-flexbox/images/rel-vs-abs-flex.svg flex-basis.

+5

All Articles