我有一个适当的背景上我的wordpress主题,CSS多背景定位
我有,我想它在页面的中心位置和水平重复从左至右另一个图像。
非常相似,本网站http://www.tcs.com/homepage/Pages/default.aspx
任何提示或指示的高度赞赏。
谢谢
我有一个适当的背景上我的wordpress主题,CSS多背景定位
我有,我想它在页面的中心位置和水平重复从左至右另一个图像。
非常相似,本网站http://www.tcs.com/homepage/Pages/default.aspx
任何提示或指示的高度赞赏。
谢谢
这取决于你有你的原始背景图像。如果它被安装到HTML这样
html {
background: url(original-background.png) top left repeat-x;
}
您可以在重复水平图像附加到身体像这样
body {
background: url(repeating-background.png) top center repeat-x;
}
你能否提供一些细节,以你的CSS怎么可以和我给你更详细的答案,但这应该适用于你所需要的。
您可以设置multiple background images像这样CSS3:
body {
background: url(first_image.png) top left no-repeat,
url(second_image.png) center center repeat-x;
}
你只需要规则用逗号分隔。这是pretty widely supported。
这是你在找什么?
我会用的包装做到这一点。
<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>