当flex的值只有一个时,表示flex: <positive-number> 1 0px ,flex-basic为0,所以如果只给一个值,就算子元素给了宽度,父元素设置了flex-wrap:wrap,它也不会换行,因为flex-basic的值会覆盖width的值,flex的默认值是flex:0 1 auto
评论