我想用float来实现盒子的并排
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>边距</title> <style type="text/css"> div{ width:300px; height:300px; border:1px solid red; } #box2{ float:right; } </style> </head> <body> <div id="box1">box1</div> <div id="box2">box2</div> </body> </html>