我从网上下载了一个模板,我把菜单放在顶部,菜单下面有徽标,菜单见
但是在我向下滚动菜单项后,应该变成黑色,白色背景应该是这样的
但是发生的情况是菜单项是黑色的,带有白色背景,徽标不在白色背景中,看起来像这样
我的标题代码
<header id="header" class="transparent-header full-header " data-sticky-class="not-dark">
<div id="header-wrap">
<!-- Primary Navigation
============================================= -->
<nav id="primary-menu" class="style-2 center">
<div class="container clearfix">
<div id="primary-menu-trigger"><i class="icon-reorder"></i></div>
<ul class="divcenter">
<li class="current"><a href="index.html"><div>Home</div></a>
<li><a href="#"><div>Home</div></a></li>
<li><a href="#"><div>WHO WE ARE</div></a></li>
<li><a href="#"><div>SERVICES</div></a></li>
<li><a href="#"><div>CONTACT</div></a></li>
</ul>
<!-- Logo
============================================= -->
<div id="logo" class="divcenter">
<a href="index.html" class="standard-logo" data-dark-logo="images/logo-dark.png"><img class="divcenter" src="images/logo.png" alt="Canvas Logo"></a>
<a href="index.html" class="retina-logo" data-dark-logo="images/logo-dark@2x.png"><img class="divcenter" src="images/logo@2x.png" alt="Canvas Logo"></a>
</div><!-- #logo end -->
</div>
</nav><!-- #primary-menu end -->
</div>
</header><!-- #header end -->
答案 0 :(得分:0)
You have apply css that it is niot included here, but in general your mistake is that logo div is inside content div, and content div background is white. Separate those two divs, make first one white and second transparent and it will work.
<div> Header // transparent
<div>Content Div</div> // white bg
<div>Logo Div</div> // transparent
</div>