
1 MagicalCarl Oct 2, 2024 const anchor = document.getElementById(`example`); if (anchor) { anchor.scrollIntoView({ behavior: 'smooth', block: 'start' }); } |
&nbs; 2 drymonfidelia OP @MagicalCarl 这样变成要自己 handle 这个逻辑了,也没办法通过 https://xxx.com/my/page#example 这样的链接来直接分享某个章节,想找找有没有更优雅、完美的解法 |
3 crysislinux Oct 2, 2024 via Android 就 angular 来说应该可以只用 history api 吧,这样就不占用这个东西了 |