0

我有 wordpress 网站,我想更改背景,我需要两张图片作为背景示例:http: //i.imgur.com/8HMY8al.png
我想要它的正文,代码现在是:

body {
    background: #fff;
    color: #494949;
    font-family: Arial,Trebuchet MS,Helvetica,sans-serif;
    font-size: 12px;
    line-height: 18px;
    background: url(images/bg1.png) top left repeat-x #D3D5D4;
}

我需要在这里添加什么?我认为 bg2 需要适合屏幕(网站)

4

3 回答 3

1

将其分成两个 div 并为每个 div 应用不同的背景

于 2013-03-27T09:42:58.100 回答
0

您可以将单独的背景设置为html元素并将一个单独的背景设置为body元素。

于 2013-03-27T09:50:01.893 回答
0

With CSS3 tricks, you can apply multiple background to only one div. See this example :

body{
    background:url(images/img.gif) no-repeat left top, 
    url(images/img.gif) no-repeat right top, 
    url(images/img.gif) no-repeat left bottom, 
    url(images/img.gif) no-repeat right bottom;
}

Careful with browsers compatibility. Hope it helped ;)

于 2013-03-27T13:18:44.180 回答