<style> .wrap{ display: flex; justify-content: space-around; margin: 100px; } .wrap div{ flex-grow: 1; flex: 0 0 33.33%; border: saddlebrown 1px solid; min-height:200px; text-align: center; line-height: 200px; } </style> <body> <div class="wrap"> <div>left</div> <div>center</div> <div>right</div> </div> </body> 效果:
注:将外层div设置为flex,设置just-content:space-around使内层div均分剩余宽度,内层div设置flex-grow:1,使每个div所占比例相同,还要设置flex:0 0 33.33%