Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

取消浏览器对页面滚动条位置的记录 #40

Open
hans000 opened this issue Jul 23, 2022 · 0 comments
Open

取消浏览器对页面滚动条位置的记录 #40

hans000 opened this issue Jul 23, 2022 · 0 comments
Labels
css css work scene 实际工作场景

Comments

@hans000
Copy link
Owner

hans000 commented Jul 23, 2022

方案:

  • 在页面加载完成后手动设置window.scrollTo(0,0)
  • 使用浏览器内置的属性,history.scrollRestoration = 'manual' (IE不能用)
@hans000 hans000 added css css work scene 实际工作场景 labels Jul 23, 2022
@hans000 hans000 mentioned this issue Jul 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css css work scene 实际工作场景
Projects
None yet
Development

No branches or pull requests

1 participant