$(
function
(){
//当滚动条的位置处于距顶部100像素以下时,跳转链接出现,否则消失
() {
$(window).scroll(
if
($(window).scrollTop()>100){
"#backtop"
).css(
"bottom"
,
"1px"
);
}
else
{
"-100px"
});
//当点击跳转链接后,回到页面顶部位置
).click(
//$('body,html').animate({scrollTop:0},1000);
($(
'html'
).scrollTop()) {
).animate({ scrollTop: 0 }, 1000);
return
false
;
'body'
backtop {
position
:
fixed
right
7.5%
bottom
-100px
z-index
2
overflow
auto
width
54px
height
border-top-right-radius:
50px
border-top-left-radius:
background-image
url
(返回顶部图片链接);
background-position
0
cursor
pointer
-webkit-transition:
all
.
5
s ease-in-out;
-moz-transition:
-o-transition:
transition:
-ms-transition:
s ease-in-out
<
div
id
=
"backtop"
title
"返回顶部"
style
"bottom: -100px;"
></
>
举报
本版积分规则 发表回复 回帖后跳转到最后一页
提供设计文章,教程和分享聚合信息与导航工具,最新音乐,动漫,游戏资讯的网站。
Archiver|小黑屋|SiteMap|艾Q网 |网站地图
Powered by Discuz! X3.4 © 2001-2019 艾Q网科技