首页 > 其他 > 详细

鼠标移至div处,展示列表

时间:2016-05-24 17:10:43      阅读:169      评论:0      收藏:0      [点我收藏+]
  1. 效果图  鼠标移至我要注册 显示个人注册和企业注册,点击个人注册跳转到个人注册,点击企业注册跳转到企业注册

    技术分享技术分享

2.源代码

  

 <script src="jquery-1.8.0.min.js" language="javascript"></script>
<script>
$(function(){
        $(".yun_topLogin").hover(function(){
                $(this).find(".yun_More").attr("class","yun_More yun_Morecurrent");
                $(this).find("ul").show();
                //alert("aaa");
            },function(){
                $(this).find(".yun_More").attr("class","yun_More");
                $(this).find("ul").hide();
                //alert("bbb");
            });
});
 
</script>
<style>
.yun_topLogin {
    display: inline;
    float: left;
    height: 35px;
    line-height: 35px;
    position: relative;
    text-align: center;
    width: 80px;
}
.yun_Moredown {
    border: 1px solid #ccc;
    border-top: none;
    left: 0;
    position: absolute;
    top: 20px;
    z-index: 12;
    background: #000;
}
.yun_Moredown li {
    float: left;
    line-height: 28px;
    text-align: center;
    width: 78px;
}
.yun_Moredown li a {
    color: #666666;
}
.yun_topLogin a.yun_Morecurrent { background:  63px 15px #FFFFFF; border-left: 1px solid #CCCCCC;border-right: 1px solid #CCCCCC;padding-left: 9px; width: 69px;}
</style>
<div class="yun_topLogin" style="background:#fff;border:1px solid red;width:120px;"> 
<a class="yun_More"  href="javascript:void(0)">用户注册</a>
    <ul class="yun_Moredown fn-hide" style=""><li><a href="http://###/index.php?m=register&usertype=1">个人注册</a>
    </li>
    <li><a href="http://###/index.php?m=register&usertype=2">企业注册</a></li>
    </ul>
</div>


本文出自 “8808968” 博客,谢绝转载!

鼠标移至div处,展示列表

原文:http://8818968.blog.51cto.com/8808968/1782519

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!