Why is the two p-tags not beside each other when the screen is wide?

前端 未结 2 1995
小鲜肉
小鲜肉 2021-01-25 10:05

When the browser width is more than 1000px the div.flex-container changes so that the to p-tags could be beside each others. They are however still above each other.

Wha

2条回答
  •  猫巷女王i
    2021-01-25 10:23

    Using the column direction for Flexbox requires an explicit height in order for wrapping to work (see: http://codepen.io/cimmanon/pen/oyilE).

    If you want to have newspaper style columns without using explicit heights, the multi-column module is what you're looking for.

    http://codepen.io/cimmanon/pen/CcGlE

    .flex-container {
      -webkit-columns: 20em;
      -moz-columns: 20em;
      columns: 20em;
    }
    

提交回复
热议问题