2010-06-16 72 views
0

我需要爲我的網站設置可調整大小的菜單和內容背景圖像,所以無論菜單條目太多或內容超出內容背景邊界,它們都會伸展。我需要垂直拉伸。CSS調整大小菜單和內容背景圖像

請問您能給我一個提示(實際的答案也可以)或者是一個很好的例子嗎?

非常感謝您提前!

+0

「調整大小」,這表明用戶可以調整一些東西......事實並非如此。也許「流動」或「調整大小」是一個更好的術語。 – MvanGeest 2010-06-16 21:09:00

+0

好的,謝謝!有想法。 – User3419 2010-06-17 01:56:02

回答

1

你可能需要組織的一組元素成類似以下內容:

HTML:

<div id="element"> 
    <div id="elementTop"> 
    <div id="elementBottom"> 

    </div> 
    </div> 
</div> 

CSS:

#element { 
    // tileable background image, repeat-y; 
} 
#elementTop { 
    // top, fixed portion of the background image, no-repeat 
} 
#elementBottom { 
    // bottom, fixed portion of the background image, no-repeat, set to: 
    background-position: 0 100%; 
} 
+0

非常感謝!釘牢它完美! – User3419 2010-06-17 01:55:09