方法一、采用百分比
.left{
width: 20%;
float: left;
}
.center{
float: left;
width: 50%;
}
.right{
float:left;
width: 30%;
}
方法二、采用绝对定位
采用绝对定位将元素固定在浏览器窗口的某个位置。
.left{
position: absolute;
top: 0;
left: 0;
width: 200px;
}
.center{
margin-left: 0 200px;
}
.right{
position: absolute;
top: 0;
right: 0;
width: 200px;
}