2012-06-05 312 views
2

我已經有一個底色和進出口試圖做的就是把白色塊就可以了什麼,文字/圖片裏面,喜歡這裏 - http://dzconstructions.co.ukHTML CSS背景覆蓋

感謝

+0

你的意思是寫HTML/CSS否? – jbrtrnd

+0

可能的複製http://stackoverflow.com/questions/3945818/overlay-background-image-onto-background-color –

+0

只需將元素(文本,圖像)的div與背景塊。 –

回答

0

div的應該幫助你實現這個。只需將背景放在身體上並插入背景色爲白色的div。然後你可以將內容/圖像插入到這個div中。

例如:

<body style="background-image:url(/background-image.gif)"> 
<div style="width:500px; height: 200px;"> 
YOUR CONTENT AND IMAGES HERE 
</div> 
</body> 
0

使用CSS把背景

body { 
    background: transparent url("Images/Background.png"); 
    height: 100%; 
    width: 100%; 
} 

然後使用的div在其上

2

好多加入白塊,以避免內聯樣式,並放置在以下單獨的樣式表...

body { 
    background-image:url(/background-image.png); 
} 

div { 
    width:500px; 
    height: 200px; 
    background-color: white; 
}