<div class="wrapper">
<div class="header">
</div>
<div class="featured">
sibiling DIV不相对,并与占用股利与位置的空间负顶部
</div>
</div>
CSS的这个样子的
.header {
background: green;
height:620px;
}
.footer {
background: blue;
height:200px;
}
.featured {
background: yellow;
width:500px;
height:420px;
margin:0 auto;
position: relative;
top: -200px;
}
同时推动负顶, silbing div“footer”不会相应地上移。这是在两个div
之间
这是我的代码大的空闲空间 http://codepen.io/adrianmak/pen/qZRqwy
需要粘页脚 – Saif