触摸事件包括 touchstart、touchmove、touchend
在移动端,滚动事件需要处理滚动条和内容的滚动。
window.addEventListener("scroll", () => { const scrollPosition = window.scrollY; console.log("滚动位置:", scrollPosition); });