我把我的網站封裝在一個叫做包裝的大DIV中,它剛好在<body>
之後開始,並在它之前結束。即背景位置不會自己定位
<body>
<div id="wrapper">
... website ...
</div>
</body>
我有下面的代碼樣式#wrapper指定
#wrapper {
width: 960px;
margin: 0 auto;
padding: 0 7px;
background: #c1cca0 url(images/fade.gif) repeat-y scroll 0 300px;
}
然而,後臺啓動頁面的最頂端重複,而不是300像素下來。我是否可以不使用repeat-y
與background-position
一起使用,還是有其他遺失的東西?
請使用http://doctype.com/ – hobodave 2010-01-17 21:12:31
你試過其他值超過300像素?也許它看起來像是從元素的頂部開始的。但是,如果你的圖像高約300像素,它可能會被重複一次。 – Gumbo 2010-01-17 21:24:07