<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
* {
padding: 0;
margin: 0;
box-sizing: border-box;
}
.warp_height {
min-height: 100vh;
padding-bottom: 120px; /* padding-bottom: 120px This is equal to the height of the bottom */
box-sizing: border-box;
}
.header,
.footer {
height: 120px;
background-color: red;
width: 100%;
}
.header {
position: sticky;
top: 0;
left: 0;
}
.content{
background-color: blue;
height: 180px;
}
.footer {
margin-top: -120px;/* margin-top: 120px This is equal to the height of the bottom */
}
</style>
</head>
<body>
<div class="warp_height">
<div class="header">
Head , Fix the top , Can't scroll
</div>
<div class="content">
It's all about content
</div>
</div>
<div class="footer">
Bottom , Less than one screen is fixed at the bottom ;
<br>
More than one screen , Bottom setting
</div>
</body>
</html>
当前位置:网站首页>The head is fixed on the ceiling, less than one screen of footer is fixed on the bottom, and more than one screen scrolls. Pay attention to the notes
The head is fixed on the ceiling, less than one screen of footer is fixed on the bottom, and more than one screen scrolls. Pay attention to the notes
2022-04-22 22:19:00 【Strange looking】
版权声明
本文为[Strange looking]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204221622486523.html
边栏推荐
- 资源打包关系依赖树
- Download addresses of various versions of redis
- With an annual salary of 37W and a team of 12 people, Tencent was rejected...
- 快上车,数据库智能自治时代已到来,腾讯云数据库 X AI 取得新突破
- [*CTF2022]oh_ my_ lotto_ revenge
- Expected condition judgment method of selenium
- 引航成长·匠心赋能——YonMaster开发者培训领航计划全面开启
- The use of servlets corresponds to the nine built-in objects
- R language uses rjags and r2jags to establish Bayesian model
- Mobaxterm cannot drag and upload files after connecting to the virtual machine
猜你喜欢

集简云 x ServiceGo:助力硬件制造商实现设备报修、维修智能化管理

工业互联网创新迭代的推手
![[untitled]](/img/72/d3e46a820796a48b458cd2d0a18f8f.png)
[untitled]

资源打包关系依赖树

First unique character in 342 leetcode string

系列解读 SMC-R (二):融合 TCP 与 RDMA 的 SMC-R 通信 | 龙蜥技术

Precautions for biotin-4-fluorescein experiment

CDN features

SAP ui5 data type learning notes

Penetration test & Network & CTF interview questions sorting
随机推荐
Milvus 2.0 质量保障系统详解
图像预训练模型的起源解说和使用示例
What are the common interview questions for redis? Redis cluster interview questions and answers
UI测试有哪些功能问题?
UML diagram related knowledge
The 14th issue of HMS core discovery reviews the long article | enjoy the silky clip and release the creativity of the video
近期BSN开发常见问题答疑
5个程序员常用的接单平台推荐
阿里云容器&服务网格产品技术动态(202203)
Precautions for biotin-4-fluorescein experiment
r语言使用rjags R2jags建立贝叶斯模型
头部固定吸顶,不足一屏footer固定底部,超过一屏滚动,注意看注释
Agile practice | agile indicators to improve group predictability
muduo源码分析之muduo简单运用
[Luogu] p1157 combined output (DFS)
The dispute between ideal and integrated technology: where is the safer lidar?
详解云计算中的业务敏捷性
【服务器数据恢复】服务器进水导致服务器崩溃的数据恢复案例
Chrome DevTools Inspector 扩展实践
Live app source code, with the page scrolling up and down, automatic ceiling