前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >jQuery实现方式不一样的跳转到底部

jQuery实现方式不一样的跳转到底部

作者头像
全栈程序员站长
发布2022-07-15 14:33:34
4480
发布2022-07-15 14:33:34
举报

大家好,又见面了,我是全栈君

jQuery跳转到页面底部效果

在线体验:http://hovertree.com/texiao/jquery/9.htm

以下是完整HTML代码:

代码语言:javascript
复制
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>跳到底部 jquery效果- 何问起</title>
    <meta charset="utf-8" />
    <style>
        a{color:white}body{margin:0px}
    </style>
    <script type="text/javascript" src="http://hovertree.com/ziyuan/jquery/jquery-1.11.3.min.js"></script>
</head>
<body>
    <div style="position:fixed;left:0px;right:0px;width:120px;margin-left:auto;margin-right:auto;top:130px;background-color:silver">
        <a id="hovertreetofoot" style="color:red" href="javascript:;">跳到底部</a> <a href="http://hovertree.com/hvtart/bjae/65358656.htm">效果</a>
    </div>
    <div style="background-color:#959822; width:100%;height:150px;">请点击本页面的 跳到底部 链接体验效果</div>
    <div style="background-color:Green; width:100%;height:150px;">
        hovertree.com
        <br /><a href="http://keleyi.com/dev/94fb5964c80ee829.htm" target="_blank">绿色箭头图片返回顶部效果</a>
        <br /><a href="http://keleyi.com/a/bjac/7cc2358ac924ebc5.htm" target="_blank">蓝色方块返回顶部</a>
        <br /><a href="http://keleyi.com/a/bjac/6f008786225269ac.htm" target="_blank">纯文本返回顶部</a>
        <br /><a href="http://keleyi.com/a/bjac/8aa32432160f9aa4.htm" target="_blank">漂亮的返回顶部、底部和留言</a>

    </div>
    <div style="width:738px;height:186px;margin:10px auto;">
    </div>
    <div style="background-color:Red; width:100%;height:150px;">欢迎</div>
    <div style="background-color:Yellow; width:100%;height:150px;">hi</div>
    <div style="background-color:Silver; width:100%;height:150px;">何问起</div>
    <div style="background-color:Aqua; width:100%;height:150px;">hovertree.com</div>
    <div style="background-color:Fuchsia; width:100%;height:150px;">何问起</div>
    <div style="background-color:Green; width:100%;height:150px;">hovertreetofoot</div>
    <div style="background-color:Blue; width:100%;height:150px;">柯乐义</div>
    <div style="background-color:Olive; width:100%;height:350px;">何问起 返回顶部</div>
    <div style="background-color:Green; width:100%;height:150px;">HoverTree</div>
    <div style="background-color:Purple; width:100%;height:150px;">jquery</div>
    <div style="background-color:Green; width:100%;height:150px;"><a href="http://hovertree.com/hvtart/bjae/65358656.htm" target="_blank">原文</a></div>
    <div style="background-color:Lime; width:100%;height:150px;">hovertree.com</div>
    <div style="background-color:Orange; width:100%;height:150px;">完整代码</div>
    <div style="height:130px;"></div>   

    <script>
$('#hovert'+'reetofoot').click(function () {
$('html,body').animate({ scrollTop: $(document).height() }, 1000); return false;
});</script>

</body>
</html>

博客园 roucheng js,jquery,css,html5特效 http://www.cnblogs.com/roucheng/p/texiao.html

发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/120695.html原文链接:https://javaforall.cn

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2021年12月,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档