html - 如何构建柔性结构?

标签 html css responsive-design

我想用这样的 `CSS 构建一个灵活的结构

enter image description here

TOP 和 BOTTOM divs 具有固定高度,而中央框具有响应高度。而且它们都应该覆盖整个容器 div。

谁能告诉我怎么做?

最佳答案

body{position: relative;padding: 0px; margin: 0px;}
.top-sec{   background: #30a7fc none repeat scroll 0 0;
    height: 40px;
    left: 0;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 100;}
.middle-sec{
  bottom: 0;
    clear: both;
    left: 0;
    overflow-x: auto;
    overflow-y: initial;
    position: fixed;
    top: 40px;
    width: 100%;
    background: #000; color: #fff;
	}
.bottom-sec{
 background: #0000ff none repeat scroll 0 0;
    bottom: 0;
    height: 24px;
    left: 0;
    min-width: 100%;
    padding: 0;
    position: fixed;
    right: 0;
    z-index: 1000;
	}
<div class="top-sec"></div>
<div class="middle-sec">Please put here big data</div>
<div class="bottom-sec"></div>

关于html - 如何构建柔性结构?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32605751/

相关文章:

javascript - IJavaScript 无法正常工作/链接

css - Firefox 17 滚动错误

javascript - 使用单一功能全屏制作多张图片

html - 在页面顶部设置图像

css - 粘性子 div 相对于父 div 水平滚动

html - CSS3 - 变换问题 - Div 定位

css - 媒体查询只适用于 !important

html - 如何在 html/css 的移动 View 中逆时针旋转元素?

css - 流体布局 : What image will the user download?

Html表格/tr高度