显示return top的图标
$(window).scroll(function(){varsc=$(window).scrollTop();varrwidth=$(window).width()+$(document).scrollLeft();varrheight=$(window).height()+$(document).scrollTop();if(sc>800){$("#goTop").css("display","block");var_width=$(".progress").width()+$(".progress").offset().left+110;$("#goTop").css("right",(rwidth-_width)+"px");}else{$("#goTop").css("display","none");}});$("#goTop").click(function(){$('body,html').animate({scrollTop:0},300);});
<divid="goTop"class="goTop"></div>
.goTop{background:url(p_w_picpaths/return-top.png)no-repeat;height:32px;width:32px;position:fixed;bottom:20px;right:0;display:none;cursor:pointer;}
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。