![](https://img2020.cnblogs.com/blog/1350951/202010/1350951-20201027163824509-921639634.jpg)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <title></title>
6 <style type="text/css">
7 *{
8 margin: 0;
9 padding: 0;
10 }
11 .box{
12 width: 1000px;
13 margin: 50px auto;
14 overflow: hidden;
15 }
16 .left,.right{
17 float: left;
18 width: 500px;
19 font-size: 24px;
20 color: #fff;
21 }
22 .left{
23 height: 500px;
24 background-color: red;
25 }
26 .right{
27 height: 500px;
28 background-color: green;
29 /* margin-left: -1000px; */
30 }
31 </style>
32 </head>
33 <body>
34 <div class="box">
35 <div class="left">北京北京北京北京北京北京北京北京北京北京</div>
36 <div class="right">上海上海上海上海上海上海上海上海上海上海</div>
37 </div>
38 </body>
39 </html>