.content{ width:960px; height:300px; border:1px solid #ccc; background-color:#eee; margin-bottom:15px;}
.top{ position:fixed; bottom:65px; right:15px; width:50px; height:50px; z-index:10; text-align:center; line-height:50px; border:1px solid #ccc; border-bottom:none; cursor:pointer;}
.xia{position:fixed; bottom:15px; right:15px; width:50px; height:50px; z-index:10; text-align:center; line-height:50px; border:1px solid #ccc; cursor:pointer;}
<div class="content">laegkdsgksdhklgsdhfbsdkjb</div>
<div class="content">laegkdsgksdhklgsdhfbsdkjb</div>
<div class="content">laegkdsgksdhklgsdhfbsdkjb</div>
<div class="content">laegkdsgksdhklgsdhfbsdkjb</div>
<div class="content">laegkdsgksdhklgsdhfbsdkjb</div>
<div class="content">laegkdsgksdhklgsdhfbsdkjb</div>
<div class="xia">下</div>
<div class="top">上</div>
$(function(){
var b_height=$("body").height()
$(".top").click(function(){
$("html").stop(true,false).animate({scrollTop:0},700)
})
$(".xia").click(function(){
$("html").stop(true,false).animate({scrollTop:b_height},700)
})
$(".top,.xia").hover(function(){
$(this).css("background-color","red")
},function(){
$(this).css("background-color","#fff")
}
)
})