扫码关注官方订阅号
闭关修行中......
假定:header{height:60px;}footer{height:100px}那么中间的main-box{min-height:calc(100% - 160px)}
不知道如果不用fixed,footer是不是还要固定在底部?
如果不固定,只是避免空隙的话,可以reset body的padding和margin为0
body, p, dl, dt, dd, ul, ol, li, pre, form, h1, h2, h3, h4, h5, h6, p, input{ padding:0; margin:0; }
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
假定:header{height:60px;}footer{height:100px}
那么中间的main-box{min-height:calc(100% - 160px)}
不知道如果不用fixed,footer是不是还要固定在底部?
如果不固定,只是避免空隙的话,可以reset body的padding和margin为0