/* body的height必须要有 */
body { height: 100%; padding: 0; margin: 0; }
.outer { height: 100%; position: relative; }
.A { height: 100px; background: #BBE8F2; }
/* 注意B没有高度 */
.B { background: #D9C666; width: 100%; position: absolute; top: 100px ; left: 0 ; bottom: 0; }
html上下布局,上方高度固定,下方高度自动填满
于 2022-09-18 15:06:18 首次发布