jquery鼠标经过弹出层写法
<pre>
<div class="navitem"><a href="/index.php?c=news&a=index&id=52">新闻中心</a>
<div class="navitemlist" style="display: none;">
<a href="/index.php?c=news&a=index&id=52">公司新闻</a>
<a href="/index.php?c=news&a=index&id=53">媒体报道</a>
</div>
</div>
</pre>
<pre>
$(".navitem").hover(function(){
$(this).children('a').next('.navitemlist').fadeIn();
},function(){
$(this).children('a').next('.navitemlist').css('display','none');
});
</pre>
<pre>
.header .navitem {
height: 100%;
padding-left: 20px;
padding-right: 20px;
display: block;
line-height: 102px;
font-size: 16px;
color: #242169;
border-bottom: 1px #FFF solid;
text-decoration: none;
float: left;
position: relative;
}
.navitemlist {
height: auto;
overflow: hidden;
position: absolute;
left: 0px;
top: 75px;
background: #FFF;
z-index: 9999;
text-align: left;
display: none;
}
</pre>