比如我现在 a.html 的时候,我想跳转到 b.html ,并且是 b.html 的某一个位置,用 <a href=>,

a.html里:

<a href="b.html#abs">xxx</a>

b.html里加一个锚记:

<a name="abs" class="maodian"></a>

jQuery方法()  (写在bhtml页面里面)

$("html,body").animate({scrollTop:$(".maodian").offset().top},500);

 

相关文章:

  • 2021-12-12
  • 2022-12-23
  • 2022-12-23
  • 2021-08-20
  • 2022-12-23
  • 2021-05-24
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-09-19
  • 2021-10-26
  • 2021-12-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案