账号通
    

账号  

密码  

1575

查看

0

回复
主题:[分享]栏目切换时,整体网页弹跳切换效果 [收藏主题]  
hasdiff 当前离线

802

主题

2

广播

11

粉丝
添加关注
级别:七年级

用户积分:4148 分
登录次数:438 次
注册时间:2011/10/28
最后登录:2024/5/14
hasdiff 发表于:2019/11/29 21:47:08   | 只看该作者 查看该作者主题 楼主 
导航点击切换,网页切换弹跳效果,代码如下
  1. .wrap为body里面的最外层div
  1. $(".nav li a").click(function(){        if( $(this).attr("target") != "_blank"){                if( $(this).attr("href") != "javascript:;" && $(this).attr("href") != "#" )                return openwork($(this).attr("href"));                }});

  1. function openwork(url){        $(".wrap").css({'-webkit-animation':"bounceIn 1s .25s ease both",'-moz-animation':'bounceIn 1s .25s ease both','animation':'bounceIn 1s .25s ease both'});        $("body").append("<div class='page-cover'></div>").css("position","relative");        $(".page-cover").delay(1600).animate({"height":$(document).height()},800,null,function(){                location.href = url;        });        return false};
 
,
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
<上一主题 | 下一主题 >
Powered By KesionCMS Version X1
厦门科汛软件有限公司 © 2006-2016 页面执行0.07422秒 powered by KesionCMS 9.0