簡體   English   中英

正文寬度100%頁面不顯示

[英]body width 100% of page not screen

我的頁面正文中的背景圖片設置為右下角。 但是,當頁面中的內容延伸到屏幕之外時,背景圖像將停在屏幕邊緣,而不是實際內容的結束位置。

這是相關的CSS:

html, body {
    margin : 0;
    padding : 0;
    font-family : arial, sans-serif;
    background-color : #15242d;
    height: 100%;height:auto;
    min-width: 100%;width:auto;
    font-size: 15px;
    color: #959595;
}

body {
    background-image : url(images/body_bkg.gif);
    background-repeat: no-repeat; 
    background-position:right bottom;
}

解決此問題的最佳方法是什么?

如果您還沒有,則需要將網站內容包裝在一個包含div ,該div會擴展為內容的大小。 然后,您需要將背景圖像應用於該div ,而不是將其放在body

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM