2013-02-12 100 views
0

我有這樣的:<body background="CFIS Fantasy Pool Logo Small.png" bgcolor="333333">重複HTML背景圖像只有

我想,這樣它重複Y添加一個標籤,所以像repeat-y。我已經嘗試了很多東西,但它不起作用,它只是遍佈整個屏幕。如果我要添加repeat-y標記,整個事情會是什麼樣子。順便說一下,我希望它在左側重複。

回答

2

你可以用在body標籤內嵌樣式做它像這樣:

<body style="background: #333 url("CFIS Fantasy Pool Logo Small.png") repeat-y 0 0; 

但我建議你將它添加到你的樣式,像這樣:

<body> 

body { 
    background: #333 url("CFIS Fantasy Pool Logo Small.png") repeat-y 0 0; 
} 

我還建議不要在文件名中使用空格或大寫字母,否則可能會導致問題。這是更好地做這樣的事情:

cfis_fantasy_pool_logo_small.png 
1

這應該工作:

background-repeat:repeat-y; 

而對於定位,用途:

background-position:left; 
OR 
background-position:left top; 
OR 
background-position:left bottom;