大螢幕下背景圖不夠寬/高導致邊緣露白,兩大經典技巧完美解決:

body {
margin: 0; padding: 0;
background: #f8f7e5 url(wdw-bg.jpg) no-repeat center top;
width: 100%; display: table; /* 修正舊 IE 高度塌陷 */
}
圖片邊緣為純色 #f8f7e5,超出圖片範圍自動顯示 body 背景色,無縫銜接。


body {
background: url(cork-pattern.gif) repeat; /* 輕量可平鋪紋理 */
}
#wrapper {
background: url(main-visual.jpg) no-repeat center top;
min-height: 100vh; /* 確保至少一屏高 */
}
關鍵:主視覺圖邊緣顏色與紋理主色調接近(稍深),視覺自然過渡。
body {
background:
url(main-visual.jpg) no-repeat center top,
url(cork-pattern.gif) repeat;
background-color: #f8f7e5; /* 終極兜底色 */
}
單一元素、無額外 wrapper、支援所有現代瀏覽器(IE9+),為當前首選方案。