ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
~~~ <title>Document</title> <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.js"></script> <style> #test{ width:100px; height:100px; background: red; position: fixed; right:10px; bottom:50px; } body{ height:2000px; } </style> </head> <body> <div id="test"> </div> <script> /* jquery动画 $(selector).animate(attr,duration) scrollTop scrollLeft */ $("#test").click(function(){ // $(this).animate({width:"200px"},1000).animate({height:"200px"},1000) $("html,body").animate({scrollTop:"0"},1000) }) </script> </body> ~~~