效果图
<!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>三栏布局左侧自适应,中间和右侧固定</title>
<style>
body{
margin: 0;
padding: 0;
}
.container{
overflow: hidden;
}
.left{
float: left;
background-color: greenyellow;
width: 100%;
height: 200px;
margin-right: -300px;
}
.center{
width: 150px;
height: 200px;
float: left;
background-color: lightseagreen;
}
.right{
width: 150px;
height: 200px;
float: left;
background-color: blue;
}
.content{
margin-right: 300px;
}
</style>
</head>
<body>
<div class="container">
<div class="left">
<div class="content">左侧自适应11111111111111</div>
</div>
<div class="center">中间固定</div>
<div class="right">右侧固定</div>
</div>
</body>
</html>