2014-01-05 36 views
0

目前我的网页看起来是这样的: enter image description here的WordPress:问题与徽标部分不能正常工作

但是,当我向下滚动,恒星的背景图像重叠的标志部分,如下所示: enter image description here

这是网站标题CSS的样子:

.site-header { 
    position: relative; 
    z-index: 1000; 
    /*background-attachment: fixed; */ 
} 

.site-header .home-link { 
    color: #141412; 
    display: block; 
    margin: 0 auto; 
    max-width: 1080px; 
    height: 130px; 
    padding: 0 20px; 
    text-decoration: none; 
    width: 100%; 
} 

.site-header .site-title:hover { 
    text-decoration: underline; 
} 

.site-title { 
    font-size: 60px; 
    font-weight: bold; 
    line-height: 1; 
    margin: 0; 
    padding: 58px 0 20px; 
} 

.site-description { 
    font: 300 italic 24px "Source Sans Pro", Helvetica, sans-serif; 
    margin: 0; 
} 

,这是怎样的明星形象被格式化当前设置:

body.page-id-72 #stars { 
    background: #425169 url("../images/photos/stars.gif") top center; 
    width: 100%; 
    height: 8000px; 
    position: fixed; 
    top: 300px; 
    z-index: 100; 
} 

我希望网站标题背景保持白色,因为它显示在第一张图片中。在这方面的任何帮助将是伟大的

+0

你能提供到你的网站的链接吗? –

+0

它还在开发中所以不能提供链接 – nathandrake

回答

1

只需将此添加到您的CSS。您目前没有任何.site-header的背景,因此当您向下滚动时,它会将您div的背景与地球相关联。

.site-header { 
    background: white; 
    z-index: 101; //you likely need to add this too, b.c you gave a z-index of 100 to the stars 
} 

,如果你不想改变每一页,只是一个与明星背景上.site头,你可以尝试

.page-id-72 .site-header { 
    background: white; 
    z-index: 101; //you likely need to add this too, b.c you gave a z-index of 100 to the stars 
} 
1

尝试的结尾写这css文件: -

.site-header { 
    background-color:#FFF; 
} 

如果仍然不起作用,那么试试这个: -

.site-header { 
    background-color:#FFF !important; // !important is usually not recommended. 
} 
+0

谢谢你这个工作 – nathandrake