• 沙里软件

  • ShaliSoft.com [手机站]   办公桌收纳抽屉
  • 首页
  • 博文
  • 演示
  • 管理
  • 滚动悬浮固定JS特效

    网络   2018/5/31 11:51:40
    <style>
    .rg_fixed {position: fixed;width:100%;bottom:80px;_position:absolute;_bottom:auto;_top:expression(eval(document.documentElement.scrollTop)+3);}
    </style>
    
    //滚动顶部判断
    <script>
    var bdggrgtop=$(".Footer-top").offset().top;
    $(window).scroll(function(){console.log($(this).scrollTop());
    if($(this).scrollTop()<bdggrgtop){
    $('#test2').addClass('rg_fixed')
    }else{
    $('#test2').removeClass('rg_fixed');
    }
    });
    </script>
    
    //滚动底部判断
    <script>
    $(function($) {
    var ttop=$("#test3").offset().top;
    var theight=$("#test3").height(); console.log(theight);
    var ttop2=$("footer").offset().top;
    var theight2=$("footer").height();
    
    $(window).scroll(function(){
    if($(this).scrollTop()+$(window).height()<(ttop2+theight-40)){
    $('#test3').addClass('rg_fixed')
    }else{
    $('#test3').removeClass('rg_fixed');
    }
    });
    });
    </script>


    阅读(5120) 分享(0)

    上一篇: Windows Server 2003操作系统单网卡搭建VPN服务器
    下一篇: EditPlus 添加文件比较工具winmerge

  • 精彩推荐

    ◆ Win7的IIS7中ASP获得的系统日期格式为斜杠和去掉星期的解决办法
    ◆ 腾讯OA基础服务使用C# 开发的千万级应用
    ◆ 怎么做秒杀系统?秒杀系统设计
    ◆ 怎么设计比较安全的密码加密方法
    ◆ asp.net 用Stopwatch计算运行时间
    ◆ ASP.NET Eval四种绑定方式
    ◆ 安卓手机QQ新功能WiFi共享泄露用户隐私
    ◆ 我为什么不喜欢面向对象
    ◆ 老照片:马云、马化腾、李彦宏、刘强东、李开复,大佬们的罕见童年照
    ◆ 为什么刷单会被淘宝轻而易举的查到?
  • 用心做事 不能唯利是图

    • 吊儿
    • 用QQ联系我17905772
  • 搜索


  • 最新文章

    • 导出Excel 格式 mso-number-format
    • 服务器iis支持tls1.2,windows server 2008 r2 中IIS启用TLS 1.2(安装SSL后用TLS 1.2)
    • MySQL配置优化
    • EditPlus 添加文件比较工具winmerge
    • 滚动悬浮固定JS特效

  • 热门文章

    • php sso单点登录实现代码
    • 中国菜刀(China chopper) 最新黑客工具
    • redis.conf中文版(基于2.4)
    • 搜索引擎名单大全
    • php图片上传类,支持加水印,生成略缩图

  • 最新图库


  • 最新评论


  • 友情链接

  • 沙里软件

  • 最近访客

    Powered by ShaliSoft.com 豫ICP备13008529号

    免责声明:本站部分内容来源于互联网,转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,不为其版权负责,也不构成任何其他建议。如果发现侵犯版权,联系QQ17905772进行删除。