我有以下
<nav class="navbar navbar-default navbar-fixed-top" role="navigation" >
<div class="container">
<nav class="row main-navi uppercase navigationlinks">
<h1 class="visuallyhidden">Navigation</h1>
<ul>
<li id="logo-container"><a id="logo" href="" data-target="start" title="EPIC Companies"></a></li>
<li class="white-shadow"><a href="#about" data-target="about">About</a></li>
<li><a href="#values" data-target="values">Values</a></li>
<li><a href="#team" data-target="team">Team</a></li>
<li><a href="#portfolio" data-target="portfolio">Portfolio</a></li>
<li><a href="#join" data-target="join">Join</a></li>
<li><a href="#contact" data-target="contact">Contact</a></li>
</ul>
</nav>
</div>
</div><!-- /.container-fluid -->
</nav>
我希望.navbar-fixed-top和.navigationlinks的CSS适用于除徽标容器之外的所有内容,所以我有:
#logo-container{
background: black;
}
.navbar-fixed-top:not(#logo-container){
background:black;
border-style: none;
border-width: 0;
height:150px;
opacity: 0.6;
}
.navigationlinks:not(#logo-container){
margin-right:100px;
opacity:0.6;
border-style:none;
}
我想要达到的目标是不在徽标上使用不透明度0.6,仅在其他链接上使用。有什么帮助吗?
我尝试了CSS,让我们说红色背景,但不透明度仍为0.6:
#logo-container{
background-color:rgba(255,0,0,1);
}