<style>
*{
margin: 0;
padding: 0;
}
html,body{
height: 100%;
}
.box1{
width: 100%;
height: 50px;
background-color: red;
}
.box2{
width: 100%;
height: auto;
}
.box3{
width: 100%;
height: 50px;
background-color: green;
}
.box4{
width: 200px;
height: 100%;
min-height: 500px;
background-color: black;
float: left;
}
.box5{
width: 200px;
height: 100%;
min-height: 500px;
background-color: blue;
float: right;
}
.box6{
width: calc(100%-400px);
height: 100%;
min-height: 500px;
background-color: gold;
}
</style>
</head>
<body>
<div class="box1">
123000
</div>
<div class="box2">
<div class="box4"></div>
<div class="box5"></div>
<div class="box6"></div>
</div>
<div class="box3">
789
</div>
两栏布局方法一
<style>
*{
margin: 0;
padding: 0;
}
html,body{
height: 100%;
}
.box1{
width: 200px;
height: 100%;
background-color: red;
float: left;
}
.box2{
width: auto;
height: 100%;
background-color: yellow;
margin-left: 200px;
}
</style>
两栏布局方法二
<style>
*{
margin: 0;
padding: 0;
}
html,body{
height: 100%;
}
.box1{
width: 200px;
height: 100%;
background-color: red;
float: left;
}
.box2{
width: calc(100%-200px);
height: 100%;
background-color: yellow;
}
</style>
三栏布局
<style>
*{
margin: 0;
padding: 0;
}
html,body{
height: 100%;
}
.box1{
width: 200px;
height: 100%;
background-color: red;
float: left;
}
.box3{
width: calc(100%-400px);
height: 100%;
background-color: yellow;
}
.box2{
width: 200px;
height: 100%;
background-color: green;
float: right;
}
</style>
</head>
<body>
<div class="box1">
123000
</div>
<div class="box2">
789
</div>
<div class="box3">
789
</div>