CSS0016: 多个DIV并排均匀分布 box-sizing
1,
<!DOCTYPE html> <html> <head> <style> div.container { width:30em; border:1em solid; } div.box { box-sizing:border-box; -moz-box-sizing:border-box; /* Firefox */ -webkit-box-sizing:border-box; /* Safari */ width:33%; border:1em solid red; float:left; } </style> </head> <body> <div class="container"> <div class="box">这个 div 占据左半部分。</div> <div class="box">这个 div 占据右半部分。</div> <div class="box">这个 div 占据右半部分。</div> </div> </body> </html>

琥珀君的博客

浙公网安备 33010602011771号