父级设置display:flex;子级宽度无效的解决办法 2020-11-27 本文已影响0人 小棋子js flex-shrink 这个属性默认为1 ,即空间不足会自动缩小,我们只要设置0就可以了。 子级css添加flex-shrink:0即可