我想通过CSS添加我自己的背景图像来覆盖Wordpress Twenty-Seventeen标题图像。但是,它只显示空白...这是身体的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/
有人可以帮忙吗?非常感谢!
.site-content-contain
和
.site-mast-head
都有
background-color: #fff;
它涵盖了你的background-image
。
我找到了一个可以解决的解决方法!但是诀窍呢。我刚刚将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;
}
你只需要从background-color: #fafafa;
类中删除.site-header
。