2010-07-29 181 views

回答

1

body{ 
    background-image:url(path to image) no-repeat left top 
} 

你的形象應該足夠大,因爲你不重複它。

+0

添加「no-repeat lef top」圖像現在甚至沒有顯示 – user384080 2010-07-29 06:53:22

+0

抱歉沒有意識到我正在使用背景圖像。現在如何將圖像拉伸以覆蓋整個頁面? – user384080 2010-07-29 06:56:55

+0

@ ranald-yoh:請看看這個:http://css-tricks.com/how-to-resizeable-background-image/ – Sarfraz 2010-07-29 07:10:04

0
* { margin:0; padding:0; } 
body { background:url(/file.jpg) no-repeat top center; } 

如果它看起來離你可能需要更多的heightness。

html, body { height:100%; } 
+0

添加「無重複頂部中心」圖像現在甚至沒有顯示 – user384080 2010-07-29 06:53:56

+0

對不起,我沒有意識到我正在使用背景圖像。現在如何拉伸圖像來覆蓋整個頁面? – user384080 2010-07-29 06:55:19