Control order of vertically stacked elements using only CSS Flexbox

后端 未结 1 1358
温柔的废话
温柔的废话 2021-01-25 08:26

I\'m trying to use the CSS Flexible Box Layout Module to control the order that elements are rendered. Here\'s some sample HTML (and fiddle):

1条回答
  •  旧时难觅i
    2021-01-25 09:13

    You should call #outer-container and not .outer-container in CSS file. Then the flex model will be triggered.

    To only put blue objects last, then just apply: order:1; to it and nothing to others: DEMO

    Order defaut value is 0.

    0 讨论(0)
提交回复
热议问题