<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <title></title>
        <style type="text/css">
            .toTop{
                width: 38px;
                height: 38px;
                background: yellow;
                text-decoration: none;
                overflow: hidden;
                position: fixed;
                right: 100px;
                bottom: 100px;
            }
        </style>
        <script src="http://libs.baidu.com/jquery/1.11.1/jquery.min.js"></script>
        <script type="text/javascript">
            $(function(){
                $(".toTop").click(function(){
                    $("body").scrollTop(0);
                })
            })
        </script>
    </head>
    <body>
        <a href="#none" class="toTop"><span>返回<br/>顶部</span></a>
    </body>
</html>

 

posted on 2016-01-11 17:57  北冥鱼鱼鱼  阅读(154)  评论(0编辑  收藏  举报