css - 在 Twentyeleven 主题上使页眉透明

标签 css wordpress header wordpress-theming customization

我已经搜索了答案,但没有找到任何有助于解决我的问题的答案。我正在使用 twentyeleven 的子主题,我试图使标题透明,以便它吸收页面背景。我在我的子主题 CSS 中完成了以下操作。

/* =Header
----------------------------------------------- */

#branding {
border-top: 0px; 
padding-bottom: 10px;
position: relative;
z-index: 9999;
background: transparent !important;

} 
#site-title {
margin: 0 auto;
padding: 5.9em 0 0 1.30em;
font-family: 'Abel', sans-serif;
text-align: center;
}
#site-title a {
color: #000066;
font-family: 'Abel', sans-serif;
letter-spacing: -5px;
font-size: 80px;
font-weight: normal;
line-height: 25px;
text-decoration: none;
}
#site-title a:hover,
#site-title a:focus,
#site-title a:active {
color: #000066;
font-family: 'Abel', sans-serif;
}
#site-description {
color: #000066;
font-size: 25px;
font-family: 'Abel', sans-serif;
margin: 0 0px 1.35625em .8em;
text-align: center;
}
#branding img {
height: auto;
display: block;
width: 960px;

}

如果您看到任何我可以添加、更改或删除的内容。或者知道在 css 的其他部分可以做的一些其他类型的技巧,请告诉我。

谢谢!

最佳答案

它背后有 div,使它具有背景,如果你给我一个链接,我会告诉你确切的操作,但我猜这是罪魁祸首之一。

#page {
     background: #fff;
}

做那个

background:transparent;

关于css - 在 Twentyeleven 主题上使页眉透明,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21638425/

相关文章:

javascript - 像 Spotify 一样创建 div 过渡

jquery - 如何有条件地对齐网页文本?

php - 我可以有条件地更改 Wordpress 中 the_content() 返回的内容吗?

html - 我该如何简化这个 CSS?

javascript - 从 wordpress javascript 文件中删除注入(inject)的恶意软件

html - 打印 CSS 分页符

html - 背景图像无重复位置 : right not appearing. 图像引用正常。是什么赋予了?

c - C中包含头文件时,是否会自动包含同名的.c文件?

c++ - 在 C++ 头文件中定义常量变量

php - 显示包含其他内容的 BLOB 图像