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

IntersectionObserver #19

Open
amorfati0310 opened this issue Nov 10, 2020 · 0 comments
Open

IntersectionObserver #19

amorfati0310 opened this issue Nov 10, 2020 · 0 comments

Comments

@amorfati0310
Copy link
Owner

https://heropy.blog/2019/10/27/intersection-observer/

intersectionObserver 사용해보면서 io
rootMargin 여백을 줘서 완전히 enter leave를 두면 부드럽게 연결되는 부분을 못해서
혹은 thresold [0.2] -> 이런식으로 줘도 되는데 비율이여서 높이가 비율에 따라 달라지면 thresold도 적절히 잘 쓸 것 같다.

  • io
    IE는 polyfill이 있어서 쓰는데 망설임 없이 써줘도 될 것 같다 👍
 inViewContents: [], 
- 챕터원분이 slot component를 만들어 놓으셔서 사용하기 편했다. 
 <VueIntersect
                    :key="title"
                    rootMargin="-80px 0px 0px 0px"
                    @enter="handleSectionEnter(categoryId)"
                    @leave="handleSectionLeave(categoryId)"
                >
     <section ...>
</VueIntersect>

LayLoad , TopNavigation등 intersectionObserver 활용범위가 넓다 👍

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

1 participant