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

 

a.html里:

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

b.html里加一个锚记:

<a name="abc"></a>

JQuery方法

$("html,body").animate({scrollTop:$("#${nameMao}").offset().top},1000);

 

相关文章:

  • 2021-10-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-19
  • 2022-12-23
  • 2022-12-23
  • 2021-10-22
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-06
  • 2022-12-23
相关资源
相似解决方案