jquery智能判断出现返回顶部和底部效果

2个月前 (03-06 18:53)阅读44回复0
大陆
大陆
  • 管理员
  • 发消息
  • 注册排名1
  • 经验值4189
  • 级别管理员
  • 主题837
  • 回复2
楼主

通过jquery来智能判断是否显示返回顶部或拖到底部按钮,根据当前滚动条所属位置来判断显示。

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html;charset=gb2312">
<meta name="keywords" content="武鸣人网站,武鸣信息网,武鸣本地网,武鸣信息资源平台,减肥,健身,励志,励志语录,js特效,网页特效,www.wuming.ren">
<meta name="description" content="欢迎来到武鸣人信息资源平台,各种信息免费发布,资源共享合作共赢,分享互联网流行的励志语录经典短句,减肥健身健康小常识及打卡记录,收集各种js特效代码。">
<title>jquery智能判断返回顶部和底部效果_武鸣人</title>
<style style="text/css">
body{margin:0px;background:#999;}
p{text-align:center;}
body,td,th{font-size:12px;}
#sroll{height:1800px;width:960px;margin:0px auto;background:#fff;}
#top_www_wuming_ren{width:22px;position:absolute;z-index:100001;}
#top_www_wuming_ren a{display:block;height:0;overflow:hidden;}
#top_www_wuming_ren #go_top{background:url(/img/20240306_www_wuming_ren_30.gif) no-repeat 0 0;padding-top:69px;}
#top_www_wuming_ren #go_bottom{background:url(/img/20240306_www_wuming_ren_30.gif) no-repeat 0 -69px;padding-top:70px;}
</style>
<script type="text/javascript" src="/img/jquery-wuming.js"></script> 
<script type="text/javascript" src="/img/20240306_www_wuming_ren_3.js"></script>
</head>
<body>
<a href="https://www.wuming.ren">武鸣人</a>,各种信息资源免费发布,分享励志语录经典短句,减肥健身常识,各种js特效代码。网站很好记住,wuming.ren(武鸣拼音.ren域名后缀)<hr>
<!--欢迎来到武鸣人信息资源平台,各种信息免费发布,资源共享合作共赢,分享互联网流行的励志语录经典短句,减肥健身健康小常识及打卡记录,收集各种js特效代码。-->
<script type="text/javascript" src="https://www.wuming.ren/ad/tc.js"></script>
<script type="text/javascript" src="https://www.wuming.ren/ad/a.js"></script>
<div id="sroll" style="text-align:center">需要加载js文件,请刷新页面后看效果!<br />努力是一种状态,与年龄无关,越努力越幸运,越自律越优秀!</div> 
<div id="top_www_wuming_ren">
<a href="javascript:void(0);" id="go_top" style="display:block;">去顶部</a>
<a href="javascript:void(0);" id="go_bottom">去底部</a>
</div>
</body>
</html>


0
0
收藏0
回帖

jquery智能判断出现返回顶部和底部效果 期待您的回复!

取消
载入表情清单……
载入颜色清单……
插入网络图片

取消确定

图片上传中
编辑器信息
提示信息