头部和底部固定,中间内容可滚动
2016-03-25 17:53
579 查看
html+css的代码的展示
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>上下固定,中间内容可以滚动</title>
<style type="text/css">
html,body,.page{width:100%; height:100%;overflow:hidden;}
.top,.con,.bottom{position:absolute; left:0; right:0;}
.top{top:0;z-index:1; height:30px;background:#ff0;}
.con{top:30px; bottom:40px; overflow:auto;}
.bottom{bottom:0;z-index:1; height:40px;background:#00f;}
</style>
</head>
<body>
<div class="wrap">
<div class="top">头部</div>
<div class="con">中间内容<br/>
中间内容<br/>
中间内容<br/>
中间内容<br/>
中间内容<br/>
中间内容<br/>
中间内容<br/>
</div>
<div class="bottom">底部内容</div>
</div>
</body>
</html>
相关文章推荐
- Android studio 查看修改代码历史记录
- Android 自定义 dialog
- eclipse中模拟器无法启动的错误:Failed to sync HAX vcpu context
- ViewPager中添加Fragment的方法实现
- IOS开发 统计XCODE 代码行数
- 输入两个链表,找出它们的第一个公共节点(值)
- sng二面 3.10
- Android技术笔记
- 主线程MainThread与渲染线程RenderThread
- 第四周学习进度情况
- 快速安装 GitLab 并汉化
- 图片自适应imageView属性
- 运营 | 小白学数据分析之DNU/DAU
- 树——一种数据结构(一)
- sed作业2
- 第一个struts2程序的配置
- [置顶] CAPM模型和Alpha策略
- 上面固定,左侧固定,右侧内容可滚动
- windows下c/c++编程实现 贪吃蛇简易版
- lintcode:Graph Valid Tree