并列的多个元素,让其中一个元素撑满剩余空间

思路:使用flex布局,父盒子设置display: flex; 须要自适应的盒子设置flex: 1。web <style> .box1{ width: 100%; display: flex; } .box4{ flex:1; } </style> <div class="box1"> <div class="box2">文本1</div> <div class="box3">
相关文章
相关标签/搜索