关于flex元素超出父元素的解决方法

左边是label, 右边是input。 设置父级为display:flex; input为flex:1;flex

而后label 为 white-space: nowrap; 这时input就有可能超出父级。 spa

解决方法是把input设置为width:0;就能够了;input

相关文章
相关标签/搜索