css3 - flex 父标签设置align-item:center,子元素flex:1,不起作用
伊谢尔伦
伊谢尔伦 2017-04-17 11:54:51
0
1
773

flex 父标签设置align-item:center,子元素flex:1,不起作用,该元素内容为空的时候,宽度为0,如果父标签不设置align-item:center,子元素flex:1,是有效的,宽度会填充!大家有遇到过这个问题吗?

伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

reply all(1)
PHPzhong

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

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template