欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

div自適應(yīng)高度自動填充剩余高度

  發(fā)布時間:2020-07-08 16:30:03   作者:龐國明   我要評論
這篇文章主要介紹了div自適應(yīng)高度自動填充剩余高度,文中通過示例代碼介紹的非常詳細,對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧

方案1:

Html:

<div class="outer">
    <div class="A"> 頭部DIV </div>
    <div class="B">下部DIV </div>
</div>

CSS: 

html,
body { height: 100%; padding: 0; margin: 0; }
.outer { height: 100%; padding: 100px 0 0; box-sizing: border-box ; position: relative; }
.A { height: 100px; background: #BBE8F2; position: absolute; top: 0 ; left: 0 ; width: 100%; }
.B { height: 100%; background: #D9C666; }

效果:

方案2:

HTML:

<div class="outer">
    <div class="A">頭部DIV</div>
    <div class="B">下部DIV</div>
</div>

CSS:

html,
body { height: 100%; padding: 0; margin: 0; }
.outer { height: 100%; padding: 100px 0 0; box-sizing: border-box ; }
.A { height: 100px; margin: -100px 0 0; background: #BBE8F2; }
.B { height: 100%; background: #D9C666; }

效果:

到此這篇關(guān)于div自適應(yīng)高度自動填充剩余高度的文章就介紹到這了,更多相關(guān)div自適應(yīng)高度 內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持腳本之家!

相關(guān)文章

最新評論