Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/40.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Wordpress中的多背景包装器_Php_Css_Wordpress_Background - Fatal编程技术网

Php Wordpress中的多背景包装器

Php Wordpress中的多背景包装器,php,css,wordpress,background,Php,Css,Wordpress,Background,如何在wordpress中获得index.php、archive.php和single.php的特定背景 我尝试在每种情况下都在特定的div上使用css对象,但不起作用,因为任何non-index.php都从index继承了主页 我也尝试了multiplebackground管理器插件,但是它改变了背景,而不是包装,实际的背景图像变成了内容 有没有办法做到这一点 提前谢谢 对于这些页面,您的正文上都有一个特定的类,为什么不使用它(首先放置.home,以防万一:p)。 一个粗略的例子: .home

如何在wordpress中获得index.php、archive.php和single.php的特定背景

我尝试在每种情况下都在特定的div上使用css对象,但不起作用,因为任何non-index.php都从index继承了主页

我也尝试了multiplebackground管理器插件,但是它改变了背景,而不是包装,实际的背景图像变成了内容

有没有办法做到这一点


提前谢谢

对于这些页面,您的正文上都有一个特定的类,为什么不使用它(首先放置.home,以防万一:p)。 一个粗略的例子:

.home { background: red; }
.single { background: blue; }
.archive { background: green; }
详细编辑:

正如您所提到的,如果您在CSS中声明了这一点:

body { background:url(images/body.png); }
。。对于其他页面,请使用

body.single { background:url(images/body-single.png); }
body.archive { background:url(images/body-archive.png); }

。。等等。

这是我的身体css对象身体{margin:0 auto;padding:50px 0px 0px 0px;background:url(images/body.png);字体系列:Arial,Tahoma,Century gothic,sans serif;颜色:#161514;字体大小:12px;}我不明白,你能更详细一点吗?:)以冗长的名义更新了答案。:)太棒了,太棒了,现在我明白了,呵呵,谢谢你!我试试看:)