首页 > css3 box-flex:1 下的元素设置height:100%无效?

css3 box-flex:1 下的元素设置height:100%无效?

demo: https://jsfiddle.net/njg5zL8u/
设置了dl width:100%;和height:100%;没有起作用?


100%是完全继承父元素的高度啊,你父元素都没高度,他怎么生效呢?


父元素没设置高度,当然无效


需要给d2设置高度
例如

.d2{-webkit-box-flex:1;background:yellow;height:200px}
【热门文章】
【热门文章】