<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <style> .phone { width: 1300px; height: 680px; margin: 0 auto; background-color: bisque; } .left { width: 234px; height: 680px; background-color: rgb(236, 41, 7); } .right { float: right; width: 1050; height: 680px; background-color: aliceblue; } .box { float: left; width: 250px; height: 300px; background-color: black; margin-top: 10px; margin-left: 10px; } </style> <body> <div class="phone"> <div class="left"></div> <div class="right"> <div class="box"></div> <div class="box"></div> <div class="box"></div> <div class="box"></div> <div class="box"></div> <div class="box"></div> <div class="box"></div> <div class="box"></div> </div> </div> </body> </html>
老師,我的網頁加載后right裏面内容都向下排列了