2 回答

TA貢獻1810條經驗 獲得超5個贊
min-height:100%; height:100%從html,bodyCSS 部分中刪除屬性: 。應該運作良好。
html, body {
background-color: rgb(96, 174, 238);
margin: 0px;
overflow: auto;
}

TA貢獻1829條經驗 獲得超9個贊
天哪,我修好了!因此,我必須將 #mainGrid 上的“height”更改為“min-height”。另外值得注意的是,還必須保留 html 和 body 標記中的 height 屬性,因為它們是父級,并且 margin = 0px ,因此 #mainGrid 將拉伸到頂部和底部。這是新的工作 CSS:
html, body {
? ? background-color: rgb(96, 174, 238);?
? ? margin: 0px;?
? ? overflow: auto;
? ? height: 100%;
}
/*----Main grid area ----*/
#mainGrid {
? ? background-color: rgb(233, 233, 233);
? ? border-style: none groove none groove;
? ? margin: 0 100px 0 100px;
? ? display: grid;
? ? grid: 'appHeader settingsDiv'
? ? ? ? 'products products'
? ? ? ? 'addProdBtn grandTotals';
? ? align-content: start;
? ? min-height: 100%;
}
- 2 回答
- 0 關注
- 138 瀏覽
添加回答
舉報