$("input").focus(function () {
var num = $(this).offset().top;
$("html,body").animate({scrollTop: num}, 800);

}); //关键代码



      $("input").focus(function () {
            var num = $(this).offset().top;
            setTimeout(function () {
                $("body,html").scrollTop(num);
            }, 200);

        });  //关键代码

 

相关文章:

  • 2021-05-20
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-09
  • 2022-12-23
  • 2022-12-23
  • 2021-04-18
猜你喜欢
  • 2021-07-31
  • 2021-08-04
  • 2022-01-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-11
相关资源
相似解决方案