我想有一個垂直伸展在我的網站上的居中背景圖像。 沒有滾動條移動我的居中圖像,但保留我的邊距:0自動到位。現在我的內容不符合我的背景圖像。背景圖像中心與邊緣排隊:0自動與滾動條
Html, Body
{
width: 100%;
height: 100%;
background: url('../Images/page-bgr-top.png')
center top repeat-x;
overflow: auto;
}
Body {
background: url('../Images/page-bgr-content.png')
center top repeat-y;
display: block;
overflow: scroll;
}
#Main-Page
{
width: 900px;
margin: 0 auto;
height: 100%;
display: none;
}
嘗試了不同的解決方案通過設置#Main-Page
的background-image
和overflow: auto
,也並馬上在我的網站一些討厭的滾動條。
這個網站是公開的嗎? – underscore
你可以在http://jsfiddle.net/上做一個演示嗎? – Luis
okey @Abc。等待 – underscore