【发布时间】:2014-12-02 11:31:54
【问题描述】:
我想创建一个全站点布局,我可以在其中创建细分到预先分配的位置,而无需定位设置。
我创建了一个顶部、左侧和底部的包装器,它应该始终是固定的。 示例如下:
我想要的是制作任何 div,跟随顶部/左侧包装器出现在顶部和左侧包装器下方。
<div id="topwrapper">hej</div>
<div id="leftwrapper">hej2</div>
<div><p>I want this div to start within the topleft corner of the white area, without any positioning settings</p></div>
<div id="bottomwrapper">hej3</div>
#topwrapper {
position:fixed;
width:100%;
height: 100px;
background-color:blue;
color:white;
}
#leftwrapper {
position:fixed;
width: 20%;
height:100%;
background-color:grey;
color:white;
top:100px;
}
#bottomwrapper {
position:fixed;
width:100%;
height:50px;
background-color: orange;
color:white;
bottom:0px;
}
【问题讨论】:
-
请更好地解释您想要实现的布局