flex 父标签设置align-item:center,子元素flex:1,不起作用,该元素内容为空的时候,宽度为0,如果父标签不设置align-item:center,子元素flex:1,是有效的,宽度会填充!大家有遇到过这个问题吗?
PHPz2017-04-17 11:56:51
In this case, it is recommended that you try setting width:auto;
. After all, align-items:center;
is used to cooperate with display:flex
to center the child elements (vertical and horizontal). If the child elements are required to be centered, you need to set the child element. The width and height of the element