[英]Wordpress Transparent Header & Body
Working on a Wordpress site that we're putting a Parallax background in, but I'm having a tough time with making the header transparent and perhaps a little opacity in the content. 在要放置视差背景的Wordpress网站上工作,但是我很难使标题透明并且内容可能不透明。
For example, the header is currently following this style: 例如,标题当前遵循此样式:
.header {
border-top-color:#F09C41;
border-top-style:solid;
border-top-width:0;
}
using the following doesn't help: 使用以下内容无济于事:
.header {
background:transparent !important;
border-top-color:#F09C41;
border-top-style:solid;
border-top-width:0;
}
Similar with the content. 与内容相似。 You can see the demo site here: http://tinyurl.com/nutvfvb
您可以在此处查看演示站点: http : //tinyurl.com/nutvfvb
Any help would be greatly appreciated. 任何帮助将不胜感激。 I thought this one would be easy...but I guess not.
我以为这很容易...但是我想不是。
You div
titled "main-content" has a white background-color
to it. 您的标题为“主要内容”的
div
具有白色background-color
。 So when you add any transparency
your header appears white. 因此,当您添加任何
transparency
标题将显示为白色。 You can use: 您可以使用:
.header {
background-color:transparent;
}
and change the background-color
of the "main-content" and view it in a browser. 并更改“主要内容”的
background-color
,然后在浏览器中查看。
Try this: 尝试这个:
div.main-content {
background-color:red;
}
and your header should appear red. 并且标题应该显示为红色。
This is only to show you that the header is transparent when you add: 这只是为了向您显示添加时标题是透明的:
.header {
background-color:transparent;
}
Hope this helps!!! 希望这可以帮助!!!
采用
.header { background: rgba(255,255,255,0.5) }
这没有用,因为您也将.main-content
div的background-color
属性设置为白色。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.