我正在處理的網站Tamsnails.com即將完成,但它有一個問題,我一直在困擾一段時間。商店的背景圖像將無法延伸到我高分辨率工作筆記本電腦的全屏幕。我已經嘗試了很多東西,在過去幾個月,其中很多我忘了,但居中CSS背景圖片
我記得在第一次,我有它作爲一個實際的CSS background-img
然後,我不得不
<head>
<body id="theBody">
<div id="backgroundImageWrapper" style="height: 100%; width: 100%; z-index: 0; position: absolute;">
<img id="mainBackgrond" src="background_image.JPG">
</div>
與mainbackground風格
#mainBackgrond {
height: 100%;
left: 0;
position: absolute;
top: 0;
width: 100%;
z-index: -1;
}
現在,我有
<body id="theBody">
<img id="mainBackgrond" src="background_image.JPG">
<div id="wrapper">
風格
#mainBackgrond {
height: 50em;
left: 0;
position: absolute;
top: 0;
width: 100%;
z-index: -1;
}
,因爲這至少看起來在我的家用筆記本好。
是的,我知道我拼寫'mainBackgrond'錯了..忍着我在這裏!
這是什麼問題? – joseph