How to make CSS justify-content:space-evenly fallback to space-between on Safari?

前端 未结 3 1033
萌比男神i
萌比男神i 2021-01-31 03:13

I\'m building a webpage and running test against different browsers, one of the designs involves a flexbox and space-evenly, I know this is not widely supported yet, so as a fal

3条回答
  •  执念已碎
    2021-01-31 04:05

    flex-grow should also solve your problem:

    .parent {
      display: flex;
      .child {
        flex: 1
      }
    }
    

    Thus, all children share the container space evenly as they have the same flex-grow value.

提交回复
热议问题