企业🤖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> ~~~