小程序 遮罩层,阻止下面滚动;

图示位置出现遮罩层,下面滚动;

原因:

touchmove事件冒泡;

解决方法:

冒泡就要阻止,在遮罩层阻止冒泡,小程序里面 catch+时间名可以阻止冒泡,

所以 在遮罩层填上事件 

catchtouchmove="preventdefault"
小程序1.5.0后可以写上
capture-catch:touchmove="preventdefault"
这样就可以解决;
原文地址:https://www.cnblogs.com/forest-king/p/8006510.html