jquery鼠标经过弹出层写法

  • 内容
  • 相关

<div class="navitem"><a href="/index.php?c=news&amp;a=index&amp;id=52">新闻中心</a>

<div class="navitemlist" style="display: none;">

<a href="/index.php?c=news&amp;a=index&amp;id=52">公司新闻</a>

<a href="/index.php?c=news&amp;a=index&amp;id=53">媒体报道</a>

</div>

</div>

<script>

$(".navitem").hover(function(){

$(this).children('a').next('.navitemlist').fadeIn();

},function(){

$(this).children('a').next('.navitemlist').css('display','none');

});

</script>
<style>

.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;

}

</style>
黑蜘蛛

本文标签:

版权声明:若无特殊注明,本文皆为《ღ軍尐ღ》原创,转载请保留文章出处。

字数统计:本文共有 《892》 个。

本文链接:jquery鼠标经过弹出层写法 - https://4dn.net/jsxx/263.html