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

自定义导航栏的高度如何获取? #17

Open
zhrrobert opened this issue Nov 14, 2019 · 3 comments
Open

自定义导航栏的高度如何获取? #17

zhrrobert opened this issue Nov 14, 2019 · 3 comments

Comments

@zhrrobert
Copy link

请问作者,页面上加一个滚动置顶固定的副导航栏,请问您设置的导航栏机型高度如何获取?
以下的top三个相加好像没用
position: sticky;
top: calc(var(--navBarHeight) + var(--statusBarHeight) + var(--navBarExtendHeight));

@lingxiaoyi
Copy link
Owner

你设置ref 用ref获取试试

@lingxiaoyi
Copy link
Owner

demo10我添加了获取导航栏高度的方法了 你可以参考一下

@zhrrobert
Copy link
Author

非常感谢,demo10的变色效果给我了新的灵感,不过加了backdrop-filter后上拉刷新页面非常卡顿,我以为是开发工具的问题,上传后依然存在,结果吧console.log('opciaty', opciaty);删了以后莫名的就好了

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

No branches or pull requests

2 participants