<!DOCTYPE html>
<html lang="zh">
<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>float</title>
<style>
*{
padding: 0;
margin: 0;
box-sizing: border-box;
}
.black{
height: 40px;
background: #333;
}
.box{
margin: 0 auto;
background-color: red;
height: 560px;
width: 1226px;
}
.up{
background-color: #ffc0cb;
height: 100px;
}
.left{
background-color: #ffa500;
width: 234px;
height: 460px;
float: left;
}
.right{
background-color: #87ceeb;
width: 992px;
height: 460px;
float: left;
}
</style>
</head>
<body>
<div class="black"></div>
<div class="box">
<div class="up"></div>
<div class="left"></div>
<div class="right"></div>
</div>
</body>
</html>