示意图:右下角
<style>
.top {position: fixed;display: none;width: 55px;height: 55px;right: 50px;bottom: 50px;
background: #D6D6D6;color: #fff;font-size: 36px;line-height: 55px;text-align: center;
cursor: pointer;border-radius: 40px;transition-property: background;transition-duration: 0.5s;
-webkit-transition-property: background;-webkit-transition-duration: 0.5s;-moz-transition-property: background;
-moz-transition-duration: 0.5s;
}
</style>
<div class="top" style="display: block;">↑
</div>
<script type="text/javascript">
$(document).ready(function(){
$(window).scroll(function(){
if($(this).scrollTop()>100){
$('.top').fadeIn();}
else{
$('.top').fadeOut();} });
$('.top').click(function(){
$('body,html').animate({scrollTop:0},800);});
});
</script>