![](/img/trans.png)
[英]Background color/image of div expand the whole page, but content stays in wrapper
[英]Background image outside of wrapper div, at the bottom of the page
我需要在頁面底部放置一個水平背景圖像。 授予div“包裝器”后,我所做的一切都很好,並包含了很多內容,並且出現了用戶滾動條。
問題出現在某些內容很少的頁面上,並且包裝div很短,我需要將圖像放在底部。
這是實際操作中的錯誤頁面http://www.rmcl-usa.com/
樹圖像只需要在底部。 同樣,當包裝div擴展通過用戶分辨率時,這也不是問題。
先感謝您。
在頁腳div上設置以下CSS:
position: absolute;
bottom: 0;
right: 0;
left: 0;
確保在其他div之前聲明它,使其在z-index中是最低的。
在主體關閉之前,將底部圖像div移動到右下方,然后執行以下操作:
<div id="bottomimage" style="position:absolute;bottom:0;right:0;left:0;z-index:-10;position:fixed;">
只做:
position: absolute;bottom: 0;right: 0;left: 0;
在Firefox中沒有為我做。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.