将一个弹性项目对齐到末尾,而其他项目居中

时间:2016-10-12 19:48:22

标签: css css3 alignment flexbox

此问题已在此处提出:

In CSS Flexbox, why are there no "justify-items" and "justify-self" properties?

然而,答案并不能解决我的特殊问题:

假设灰色框是一个弹性容器,我想实现这个布局:

flex items 1 and 2 aligned to the center, with flex-item 3 aligned to the end of the row

问题是如果我在flex-item 3上使用margin-left: auto我得到了这个:

flex items 1 and 2 aligned to the left, with flex-item 3 aligned to the end of the row

0 个答案:

没有答案