Front-End/Javascript2 Web API : Intersection Observer API https://developer.mozilla.org/ko/docs/Web/API/Intersection_Observer_API Intersection Observer API - Web API | MDNIntersection Observer API는 상위 요소 또는 최상위 문서의 viewport와 대상 요소 사이의 변화를 비동기적으로 관찰할 수 있는 수단을 제공합니다.developer.mozilla.org 사용자가 스크롤을 했을 때 지정 요소가 얼마나 viewport 에 노출되느냐에 따라 callback function 을 하는 API 이다. -생성자 : new IntersectionObserver(callback[,options]) callback 에는 호출하고자 하는 함수를 입력한다.options 에.. 2024. 6. 18. Element: scrollIntoView() 이벤트나 상태변화에 따라 어떤 Element 로 상위 엘리먼트의 스크롤을 이동하고자 할 때 사용하는 메서드이다. https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView Element: scrollIntoView() method - Web APIs | MDN The Element interface's scrollIntoView() method scrolls the element's ancestor containers such that the element on which scrollIntoView() is called is visible to the user. developer.mozilla.org 옵션은 2가지인데, 1. align.. 2023. 12. 5. 이전 1 다음