-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
是否考虑新增一个useStickyFixed(),用于获取当前元素是否处于吸顶状态? #2679
Comments
admin-zlj
changed the title
是否考虑新增一个useSticky,用于获取当前元素是否处于吸顶状态?
是否考虑新增一个useStickyFixed,用于获取当前元素是否处于吸顶状态?
Dec 4, 2024
admin-zlj
changed the title
是否考虑新增一个useStickyFixed,用于获取当前元素是否处于吸顶状态?
是否考虑新增一个useStickyFixed(),用于获取当前元素是否处于吸顶状态?
Dec 4, 2024
emm,这个咋判断。。。 吸顶一般不都得自己写么 |
就是已经设置 position: sticky 元素,在外部滚动时,来判断当前设置粘性定位的元素是否处于吸顶的状态 |
目前感觉用的场景不是特别多,先挂一阵子看看有没有人也有类似的需求 |
https://github.com/robinjonsson/react-use-sticky 场景: sticky 生效的时候加 style/className |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
当元素处于吸顶状态,会处理一些样式或逻辑,这种场景还是很多的;
类似这种
The text was updated successfully, but these errors were encountered: