点击返回顶部以动画方式返回

$(function(){
        $(window).scroll(function(){
            //当滚动距离超过50后,显示按钮;
            if($(window).scrollTop()>50){
                $("#top").fadeIn();
            }else{
                $("#top").fadeOut();
            }
        });
        $("#top").click(function(){
            $('html,body').animate({scrollTop:0},500);
        });
    });

最新文章

  1. redis数据结构存储Dict设计细节(redis的设计与实现笔记)
  2. MongoDB的安装与设置MongoDB服务
  3. 如果调用ASP.NET Web API不能发送PUT/DELETE请求怎么办?
  4. 数据库中Schema和Database有什么区别
  5. Java Web 工作技巧总结 16.10
  6. Android中多个调用Activity的问题
  7. list如何remove 特别容易出错
  8. 使用.net(C#)发送邮件学习手册(带成功案例)
  9. 130. Surrounded Regions
  10. Codeforces Round #226 (Div. 2)B. Bear and Strings
  11. Sdut 2409 The Best Seat in ACM Contest(山东省第三届ACM省赛 H 题)(模拟)
  12. C/C++中的const int*和int * const
  13. NOPI 导出excel 通用方法
  14. POJ2299 Ultra-QuickSort 【树阵】+【hash】
  15. Executor框架学习笔记
  16. mysql启动时报错:Starting MySQL... ERROR! The server quit without updating PID file (/opt/mysql/data/mysql.pid) 的解决方法
  17. 为什么说要搞定微服务架构,先搞定RPC框架?
  18. java.sql.SQLException: Access denied for user 'sa'@'localhost' (using password: NO)
  19. js switch 用法
  20. maven多模块项目构建

热门文章

  1. 【ACM】How many prime numbers
  2. Solidworks如何添加齿轮 运动副
  3. Hibernate关系映射(注解)
  4. Linux 静态链接库和动态连接库
  5. Bitmap和Drawable的互相转换
  6. stylus
  7. shader学习之路(1)- half lambert
  8. hdu 5311 Hidden String 字符串
  9. 创建win32窗口
  10. SpringMVC学习小结