<!doctype html> <html> <head> <meta charset="utf-8"/> <title></title> <style> .box1{ width:700px; height:700px; background-color:#0554B8; } .box2{ width:350px; height:350px; background-color:#B9998B; float:left; } .box3{ width:350px; height:350px; background-color:#DC5825; } .box4{ width:700px; height:350px; background-color:#050505; } </style> </head> <body> <div class="box1"> <div class="box2"> </div> <div class="box3"> </div> <div class="box4"> </div> </div> </body> </html>
仔细检查代码,box3的css样式设置中,没有添加float:left,添加之后,box4就会上移占据box2,3的空间
你真是粗心大意啊