设置子项的宽度以填充父项 [英] Set the width of children to fill the parent
本文介绍了设置子项的宽度以填充父项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我希望 div
的孩子填满它的宽度。
现在我正在使用这样的代码:
.parent {width:100%;显示:内联块;身高:120px;背景:#000;填充:10px; box-sizing:border-box;}。child {display:inline-block;余量:1%;宽度:31.4%; height:100px;