1. 没header,footer固定 html
<div class="page">
<div class="top">
<div>sdnjsdcnddfre测试v京东方v你</div>
</div>
<div class="footer">删除</div>
</div>

css:
.page {
width: 100%;
overflow-y: scroll;
display: flex;
flex-direction: column;
height: 100vh;
}
.top {
flex: 1;
/* // 关键, 超出部分滚动 */
overflow-y: scroll;
}

.footer {
width: 343px;
line-height: 44px;
background: #ff5446;
margin: 0 auto;
font-size: 17px;
color: #fff;
text-align: center;
flex: 0;
}

2. header footer固定 中间滑动
html
<div class="wrap">
<div class="header">header</div>
<div class="main">main</div>
<div class="footer">footer</div>
</div>

css

.wrap {
display: flex;
flex-direction: column;
width: 100%;
height: 100vh;
}

.header,
.footer {
height: 40px;
line-height: 40px;
background-color: #D8D8D8;
text-align: center;
}

.main {
flex: 1;
width: 100%;
overflow: scroll;
}

头部固定:
使用vant van-sticky

最新文章

  1. 《连载 | 物联网框架ServerSuperIO教程》- 12.服务接口的开发,以及与云端双向交互
  2. Sparse Filtering 学习笔记(三)目标函数的建立和求解
  3. php使用strlen()判断中文汉字字符串长度
  4. Cannot merge new index 67361 into a non-jumbo instruction
  5. SQL Server参数化查询中应用Like
  6. 原生javascript开发仿微信打飞机小游戏
  7. 企业服务总线Enterprise service bus介绍
  8. (二)u-boot2013.01.01 for TQ210:《Makefile分析》
  9. DBA避坑宝典:Oracle运维中的那些事儿
  10. HM中CU,TU的划分
  11. HBuilder CSS 自定义代码块
  12. matlab 图像平移操作
  13. Python——网络编程基础
  14. Home Assistant-自动化设备
  15. [10] AOP的注解配置
  16. 从boost到Adaboost再到GBRT-GBDT-MART
  17. mysql:索引原理与慢查询优化
  18. Kettle 系列随笔
  19. 更改SQLServer实例默认字符集
  20. nginx基本配置与参数说明-【转】

热门文章

  1. SQL从零到迅速精通【查询利器】
  2. 微信小程序文件上传至七牛云(laravel7)
  3. php压缩zip文件类
  4. php 23种设计模型 - 策略模式
  5. tensorflow编译成功!
  6. kali linux 更换国内源报GPG error解决办法
  7. hadoop学习笔记 一
  8. 【Vulnhub练习】Acid
  9. LINUX系统、磁盘与进程的相关命令
  10. Git初始化常用方法