首页
学习
活动
专区
圈层
工具
发布
  • 您找到你想要的搜索结果了吗?
    是的
    没有找到

    控制页面的滚动:自定义下拉到刷新和溢出效果

    (左边之前:页面内容在叠加层下滚动,右边之后:页面内容不会在叠加层下滚动) 禁用拉到刷新 关闭pull-to-refresh操作是一行CSS。只要阻止整个视口定义元素的滚动链接。...在大多数情况下,这是 body { /* 禁用“拉到刷新”功能,但允许发生滚动发光效果 Disables pull-to-refresh but allows overscroll glow effects...inbox.addEventListener('touchmove', e => { const y = e.touches[0].pageY; // 在容器顶部时激活自定义的拉到刷新效果 Activate custom pull-to-refresh...仍然保持滑动导航Disables pull-to-refresh and overscroll glow effect....inbox.addEventListener('touchmove', e => { const y = e.touches[0].pageY; // Activate custom pull-to-refresh

    4.5K20
    领券