Overlapping CSS flexbox items in Safari

前端 未结 2 863
一个人的身影
一个人的身影 2020-12-05 01:54

What\'s the correct CSS to force Safari to not overlap flex items within a default flex container?

Safari seems to give too much width to flex items with lots of con

2条回答
  •  無奈伤痛
    2020-12-05 02:52

    I also had a similar issue where flex box direction changed to column overlapped items on iPad. The issue was with the flex: 0 1 0; property applied to child element. Give the base value auto. flex: 0 1 auto;

    .parent{
        display: flex;
        flex-direction: column;
    }
    .parent .child{
        flex: 0 1 auto;
    }
    

提交回复
热议问题