2019独角兽企业重金招聘Python工程师标准>>>
返回顶部:
<a class="backtop hiddenThis" title="返回顶部"></a>
a.backtop {
background: url(/coin-portlet/images/backtotop.png) no-repeat center center;
bottom: 20px;
cursor: pointer;
display: none;
height: 70px;
position: fixed;
right: 20px;
text-indent: -9999px;
width: 70px;
z-index: 100; }
function backtopFun() {
$(window).scroll(function() {
if ($(window).scrollTop() >= 200) {
$(".backtop").fadeIn();
} else {
$(".backtop").fadeOut();
}
});
$(".backtop").click(function(event) {
$('html,body').animate({
scrollTop : 0
}, 500);
return false;
});
}
$(function() {
backtopFun();
});