html的书写代码
<div class="box">
<div class="left"></div>
<div class="cont"></div>
<div class="right"></div>
</div>
CSS的样式1定位position:
.box{
width: 100%;
height: 300px;
float: left;
position: relative;
display: inline-block;
}
.box .left{
position: absolute;
left: 0;
display: inline-block;
width: 100px;
height:300px;
background-color: aqua;
}
.box .right{
position: absolute;
right:0;
top: 0;
width: 100px;
height: 300px;
background-color:red;
}
.cont{
width: 100%;
height: 300px;
background-color: green;
}