<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title></head><style> *{ margin: 0; padding: 0; } .box {margin: 0 auto; width: 1126px; height: 614px; background-color: #ffc0cb; } .left{ float: left; width: 234px; height: 614px; background-color: #ffa500; } .right{ float: right; width: 978px; height: 614px; background-color: #87ceeb; }</style><body> <div class="box"> <div class="left"></div> <div class="right"></div> </div> </body></html>刚学,这个代码的.right为啥加了浮动之后还是在父集.box的下面