子层没办法得到父层的高度 parent (max-height), child (height:100%)

链接: https://stackoverflow.com/questions/14262938/child-with-max-height-100-overflows-parent

解释说不行的原因是子层没有办法知道具体的高度, 所以会进可能的大...

原理我不知道, 要读 W3C 才有结果....

目前的 workaround 是给父层 display:flex, 孩子就会有 height:100%

原文地址:https://www.cnblogs.com/stooges/p/14365764.html