2012-05-07 97 views

回答

0

这取决于你有你的原始背景图像。如果它被安装到HTML这样

html { 
    background: url(original-background.png) top left repeat-x; 
    } 

您可以在重复水平图像附加到身体像这样

body { 
    background: url(repeating-background.png) top center repeat-x; 
    } 

你能否提供一些细节,以你的CSS怎么可以和我给你更详细的答案,但这应该适用于你所需要的。

2

我会用的包装做到这一点。

<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<style type="text/css"> 
body { 
background-image: url(image1.jpg); 
} 
#wrapper { 
background-position: center middle; 
width:100%; 
height:100%; 
margin: 0px; 
padding: 0px; 
background-image: url(image2.jpg); 
background-repeat: x-repeat; 
} 
</style> 
</head> 
<body> 
<div id="wrapper"> 

</div> 
</body>