<!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>
<style>
.body{
width: 100%;
overflow: hidden;/* 避免另外写东西时消失 */
}
.column{
height: 200px;
float: left;
}
.center{
background-color: greenyellow;
width: 100%;
}
.left{
background-color: red;
width: 300px;
margin-left: -100%; /* 相对于父及元素的百分之白 */
}
.right{
background-color: blue;
width: 300px;
margin-left: -300px;
}
</style>
</head>
<body>
<div class="body">
<div class="center column"></div>
<div class="left column"></div>
<div class="right column"></div>
</div>
</body>
</html>