Rumah >hujung hadapan web >html tutorial >HTML固定与自适应进行布局的混合使用_html/css_WEB-ITnose
//
<!DOCTYPE html><html><head><title>this is a page</title><style type="text/css"> body{padding:0; margin:0; } .left{width:200px; height:500px; position:absolute; left:0px; top:0px; background: red;} .middle{height:500px; background: blue; margin:0 310px 0 210px;} .right{width:300px; height:500px; position:absolute; right:0px; top:0px; background: orange;}</style></head><body><div class="left">this is left</div><div class="middle">this is auto</div><div class="right">this is right</div></body></html>