layer ui 手机端怎么改变弹窗滚动条样式?颜色,大小等
需要在弹窗对象上,添加catchtouchmove事件
// 弹窗
<div catchtouchmove=stopPageScroll()>
// 弹窗的内容
</div>
js添加方法
function stopPageScroll(){
return
}
或者试试这个:
// 弹窗
<div catchtouchmove='true'>
// 弹窗的内容
</div>
用js给滚动的元素父级添加overflow:hidden的属性(前提是父级有高度限制,视窗内的),,也可以试一下document.documentElement.style.overflow='hidden';想让其滚动再添加overflow:auto