废话不多说,上代码~
方法一:float解决方案
<section class="layout float">
<style>
.layout.float {
width: 100%;
height: 100px;
}
.layout.float .floatleft-center-right>div {
height: 100px;
}
.floatleft-center-right .left {
background: red;
width: 300px;
float: left;
}
.floatleft-center-right .center {
background: yellow;
}
.floatleft-center-right .right {
background: blue;
width: 300px;
float: right;
}
</style>
<article class="floatleft-center-right">
<div class="left"></div>
<div class="right"></div>
<div class="center">
<p>float解决方案</p>
<p>float解决方案</p>
<p>float解决方案</p>
</div>
</article>
</section>
方法二:绝对定位posit