首页 > 编程 > JavaScript > 正文

顶部缓冲下拉菜单导航特效的JS代码

2019-11-20 22:21:40
字体:
来源:转载
供稿:网友

复制代码 代码如下:

<script type="text/javascript">
            $(function() {
                var d=300;
                $('#navigation a').each(function(){
                    $(this).stop().animate({
                        'marginTop':'-80px'
                    },d+=150);
                });

                $('#navigation > li').hover(
                function () {
                    $('a',$(this)).stop().animate({
                        'marginTop':'-2px'
                    },200);
                },
                function () {
                    $('a',$(this)).stop().animate({
                        'marginTop':'-80px'
                    },200);
                }
            );
            });
        </script>

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表