Skip to content
This repository has been archived by the owner. It is now read-only.

滚动列表定位 #109

Open
BNC123 opened this issue Aug 11, 2021 · 1 comment
Open

滚动列表定位 #109

BNC123 opened this issue Aug 11, 2021 · 1 comment

Comments

@BNC123
Copy link

BNC123 commented Aug 11, 2021

选取不了元素进行滚动的定位,比如下拉到一定的距离,保存了scrollTop,然后跳转去了其它的界面,返回来的时候希望可以通过选取元素设置scrollTop,但是选取不了元素,每次一返回来就是刷新从顶部开始的。有什么办法可以解决吗?

@BNC123 BNC123 closed this as completed Aug 11, 2021
@BNC123 BNC123 reopened this Aug 11, 2021
@BNC123
Copy link
Author

BNC123 commented Aug 11, 2021

document.querySelector('.scroll-container').scrollTop = 1400; 这样不行,用scrollTo也不可以

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant