如何获得这样的动态css布局:
我是新的css和布局,有一个布局的问题 我正在尝试用JS开发一个应用程序,但我希望这个布局是纯css的。可能吗 这是一把小提琴: 我的主要问题是蓝色框,因为#左侧是100%高度,而#左侧顶部有恒定高度:200px 我的代码(HTML):如何获得这样的动态css布局:,css,layout,Css,Layout,我是新的css和布局,有一个布局的问题 我正在尝试用JS开发一个应用程序,但我希望这个布局是纯css的。可能吗 这是一把小提琴: 我的主要问题是蓝色框,因为#左侧是100%高度,而#左侧顶部有恒定高度:200px 我的代码(HTML): 为什么不使用绝对定位? 看看这个: 这对我来说不起作用:我不能使用宽度百分比,因为左面板必须有600px的宽度。和#左下角必须适合其余部分(不能使用150px高度)尝试使用图形编辑器,如图层样式。 <div id="header"> </
为什么不使用绝对定位? 看看这个:
这对我来说不起作用:我不能使用宽度百分比,因为左面板必须有600px的宽度。和#左下角必须适合其余部分(不能使用150px高度)尝试使用图形编辑器,如图层样式。
<div id="header">
</div>
<div id="container">
<div id="left">
<div id="left-top"></div>
<div id="left-bottom"></div>
</div>
<div id="right">
</div>
</div>
<div id="footer">
</div>
#header {
height: 60px;
width: 100%;
}
#container {
width: 100%;
height: 100%;
position: absolute;
top: 60px;
bottom: 60px;
left:0;
}
div#left {
width: 600px;
float: left;
height: 100%;
}
div#left-top {
width: 100%;
height: 200px;
}
div#left-bottom {
#width: ?;
#height: ?;
}
div#right {
width:100%;
height: 100%;
margin-left:600px;
}
div#footer {
position: absolute;
width: 100%;
height: 60px;
bottom: 0;
left: 0;
}
#header {
height: 60px;
width: 100%;
}
#container {
height:100%;
}
div#left {
width: 600px;
float: left;
height: 100%;
}
div#left-top {
width: 100%;
height: 200px;
}
div#left-bottom {
height:150px;
width:100%;
overflow-x:scroll;
overflow-y:hidden;
}
div#left {
width:40%;
float:left;
height: 100%;
}
div#right {
width:60%;
height: 100%;
float:right;
}
div#footer {
width: 100%;
height: 60px;
}
#header, #container, #left, #left-top, #left-bottom, #right, #footer {
position: absolute;
}
#header {
top:0;
height: 60px;
width: 100%;
}
#container {
width: 100%;
top: 60px;
bottom: 60px;
}
#left {
top: 0;
bottom:0;
width: 300px;
}
#left-top {
top:0;
left:0;
width: 100%;
height: 200px;
}
#left-bottom {
top: 200px;
bottom: 0;
width: 100%;
overflow:auto;
}
#right {
top:0;
left: 300px;
right: 0;
bottom: 0;
overflow:auto;
}
#footer {
width: 100%;
height: 60px;
bottom: 0;
}