Flexbox column heights

时光毁灭记忆、已成空白 提交于 2019-12-11 19:22:52

问题


I have this site: http://kudos-topspindigital.azurewebsites.net/#/netball

If you open this in Chrome and IE you will see my issue. Basically in chrome, the right panels are around equal heights. I would like the bottom panels (the orange and dark gray one) to be twice as height as the top light gray panel. For once, IE has got it right. It actually resizes the bottom panels as flex: 2. How can I get chrome to do the same?


回答1:


Since flex is a shorthand property, flex: 1 becomes

flex-grow: 1;
flex-shrink: 1;
flex-basis: 0%;

That 0% seems to confuse Chrome in column layouts. You can use flex-basis: 0 to fix it:

.row {
  flex-basis: 0;
}


来源:https://stackoverflow.com/questions/30943071/flexbox-column-heights

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!