给页面用fixed
absolute
定位加遮罩层的时候,发现页面里的内容会随着鼠标滚轮/手指 滚动,以下是阻止下层页面滚动的方法
给遮罩层加一个取消鼠标滚轮和手指触摸行为的事件
试过只加
@touchmove.prevent
效果不理想
<template><div @touchmove.prevent.stop @wheel.prevent.stop></div></template>
时间:2022-08-17 13:50:52
给页面用fixed
absolute
定位加遮罩层的时候,发现页面里的内容会随着鼠标滚轮/手指 滚动,以下是阻止下层页面滚动的方法
给遮罩层加一个取消鼠标滚轮和手指触摸行为的事件
试过只加
@touchmove.prevent
效果不理想
<template><div @touchmove.prevent.stop @wheel.prevent.stop></div></template>
【微信小程序】小程序显示弹窗时禁止下层的内容滚动|遮罩层滚动穿透
2022-11-10
java怎么让遮罩层下面滚动_vue项目弹出层后禁止body底层的滚动事件
2021-03-10
html遮罩层禁止滚动条滚动 遮罩层上弹窗滚动时禁止下层页面滚动的处理
2022-03-08