我想通过CSS添加我自己的背景图像来覆盖Wordpress的二十七个标题图像。但是,它只显示为空白...这是body的html:
<body class="page-template-default page page-id-5 logged-in wp-custom-logo has-header-image page-one-column title-tagline-hidden colors-light page-soins" data-aos-easing="ease" data-aos-duration="400" data-aos-delay="0" cz-shortcut-listen="true">下面是我的CSS来禁用wordpress的标题图像:
.page-soins .wp-custom-header {
display: none;}
下面是我的CSS来添加我的背景图片:
body.page-soins {
background: url("images/backgrounds/soins-bg-1.jpg") no-repeat center center fixed;
background-size: cover;
}最后,这里是该页面的链接:www.http://latelierdegaia.ch/soins/
有人能帮上忙吗?非常感谢!
发布于 2018-03-01 21:04:31
.site-content-contain和
.site-mast-head两者都有
background-color: #fff;覆盖了你的background-image。
发布于 2018-03-01 21:02:40
我找到了一个可以解决的办法!但确实起到了作用。我只是将CSS背景图像添加到"site-header“类,而不是"body”类。
body.page-soins .site-header {
background: url("images/backgrounds/soins-bg-1.jpg") no-repeat center center fixed;
background-size: cover;
}发布于 2018-03-01 21:05:32
您只需从.site-header类中删除background-color: #fafafa;即可。
https://stackoverflow.com/questions/49050238
复制相似问题