第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

如何讓內(nèi)容div全屏顯示

如何讓內(nèi)容div全屏顯示

紫衣仙女 2023-10-17 17:34:08
我有html頁面,容器div包含頁眉,內(nèi)容和頁腳div,html cod和css代碼如下:HTML 代碼:  <html>    <div class="container">    <div class="header"></div>    <div class="content">    <div class="content2"></div>    </div>    <div class="footer"></div>    </div>    </html>CSS代碼:header{padding-bottom:5px;width:100%;position:fixed;top:0;z-index:100;height:70px;background-color:#006}.content{min-height: 100%;width:100%;background-color:#006;margin-top:70px;margin-bottom:60px }.content2{margin:auto;min-height: 100%;width:95%;background-color:#FFFEA5;padding-bottom: 20px;}.footer{text-align:center;width:100%;position:fixed;bottom:0;z-index:100;height:70px;background-color:#006}我希望 content2 div 是全屏的,或者它不包含任何內(nèi)容,我執(zhí)行了上面的代碼但沒有工作,它看起來像附加的圖像。
查看完整描述

3 回答

?
慕姐4208626

TA貢獻1852條經(jīng)驗 獲得超7個贊

我更改了 css 文件并使其成為這樣,現(xiàn)在可以使用了:


 .header{

    padding-bottom:5px;

    width:100%;

    position:fixed;

    top:0;

    z-index:100;

    height:70px;

    background-color:#006}

.footer{

    text-align:center;

    width:100%;

    position:fixed;

    bottom:0;

    z-index:100;

    height:70px;

    background-color:#006}

.content{

    min-height: 100%;

    width:100%;

    background-color:#FFFEA5;

    margin-top:70px;

    margin-bottom:60px }

.content2{

    height: 100%;

    margin:auto;

    width:95%;

    background-color:#FFFEA5;

    padding-bottom: 80px;

}

.wrapperDiv{

    background-color: #006;

    padding:0;

    margin:0;

    height: 100%;

        }



查看完整回答
反對 回復(fù) 2023-10-17
?
慕桂英3389331

TA貢獻2036條經(jīng)驗 獲得超8個贊

也許你可以嘗試將所有這些 div 放入父 div 中,并將該 div 設(shè)置為 100% 寬度和高度(高度不是必需的,它也會設(shè)置 100%),然后你將擁有占據(jù)整個屏幕的 div 容器。



查看完整回答
反對 回復(fù) 2023-10-17
?
PIPIONE

TA貢獻1829條經(jīng)驗 獲得超9個贊

我相信您丟失了并且需要身體標簽(除其他外),它將整個背景設(shè)置為藍色。


body{

background-color:#006

}


header{

padding-bottom:5px;

width:100%;

position:fixed;

top:0;

z-index:100;

height:70px;

background-color:#006}


.content{

min-height: 100%;

width:100%;

background-color:#006;

margin-top:70px;

margin-bottom:60px }


.content2{

margin:auto;

min-height: 100%;

width:95%;

background-color:#FFFEA5;

padding-bottom: 20px;

}


.footer{

text-align:center;

width:100%;

position:fixed;

bottom:0;

z-index:100;

height:70px;

background-color:#006}

  <html>

  <body>

    <div class="container">

    <div class="header"></div>

    <div class="content">

    <div class="content2">test</div>

    </div>

    <div class="footer"></div>

    </div>

     </body> 

    </html>


查看完整回答
反對 回復(fù) 2023-10-17
  • 3 回答
  • 0 關(guān)注
  • 240 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號