正确的CSS菜单悬停功能

时间:2013-04-16 05:29:43

标签: css colors hover

我自己制作了导航菜单,而且这只是我无法弄清楚的一件事......当我将鼠标悬停在ul“navitemul”上时,我怎样才能使A标签颜色变白 我尝试了#lovedating#navitemul:hover #lovedating a {color:white}和其他一些方法,但似乎没有任何方法,有人可以指出我正确的方向:)如果你想看到导航栏在行动访问我的网站:www.curious-howto。 com,你可以更好地了解我想要完成的事情...... 谢谢

菲利普

<li style="width:150px" id="lovedating"><a href="#">Love & Dating</a>
<div id="love&dating" class="belownav">
<div class="ontop">Love & Dating</div>
<div class="navitem"><ul id="navitemul">
<li class="marright"><a href="http://www.curious-howto.com/love-dating/broken-hearths/"><img class="fl" src="http://www.curious-howto.com/images/2013/04/Broken-Hearths.jpg" width="63" height="40" /><span class="marleft">Broken Hearths</span></a></li>
<li class="marright"><a href="http://www.curious-howto.com/love-dating/dating/"><img class="fl" src="http://www.curious-howto.com/images/2013/04/Dating.jpg" width="63" height="40" /><span class="marleft">Dating</span></a></li>
<li class="marright"><a href="http://www.curious-howto.com/love-dating/dating-humor/">    <img class="fl" src="http://www.curious-howto.com/images/2013/04/Dating-Humor.jpg" width="63" height="40" /><span class="marleft">General Health</span></a></li>
<li class="marright"><a href="http://www.curious-howto.com/love-dating/flirting/"><img class="fl" src="http://www.curious-howto.com/images/2013/04/Flirting.jpg" width="63" height="40" /><span class="marleft">Flirting</span></a></li>
<li class="marright"><a href="http://www.curious-howto.com/love-dating/kissing/"><img class="fl" src="http://www.curious-howto.com/images/2013/04/Kissing.jpg" width="63" height="40" /><span class="marleft">Kissing</span></a></li>
<li class="marright"><a href="http://www.curious-howto.com/love-dating/physical-relationships/"><img class="fl" src="http://www.curious-howto.com/images/2013/04/Physical-Relationships.jpg" width="63" height="40" /><span class="marleft">Physical Relationships</span></a></li>
<li class="marright"><a href="http://www.curious-howto.com/love-dating/relationships/"><img class="fl" src="http://www.curious-howto.com/images/2013/04/relationships.jpg" width="63" height="40" /><span class="marleft">Relationships</span></a></li>
<li class="marright"><a href="http://www.curious-howto.com/love-dating/weddings/"><img class="fl" src="http://www.curious-howto.com/images/2013/04/weddings.jpg" width="63" height="40" /><span class="marleft">Weddings</span></a></li>
</ul></div>
</div></li>

3 个答案:

答案 0 :(得分:0)

试试这个

#love&dating a:hover{color:#FFF;}

答案 1 :(得分:0)

这一个

ul li#lovedating a:hover { color:green;}

答案 2 :(得分:0)

更改

#lovedating#navitemul:hover #lovedating a {color:white}

#navitemul:hover a {color:white}