简体   繁体   English

防止在使用iscroll时超出页面的边界

[英]prevent exceeding the boundaries of my page when using iscroll

When I scroll up (dragging down the mouse pointer) I'm exceeding the first line of text and I see the gray area. 当我向上滚动(向下拖动鼠标指针)时,我超出了文本的第一行,并且看到了灰色区域。 I'm using .attr('data-iscroll', '') on a div that i have created dynamically. 我在动态创建的div上使用.attr('data-iscroll','')。 how can i prevent the page from slideing and exceeding the boundaries of my page? 如何防止页面滑动和超出页面边界?

在此处输入图片说明

Set the bounce property to false eg: 将bounce属性设置为false,例如:

myScroll = new IScroll('#wrapper', { 
    mouseWheel: true,
    scrollbars: true,
    bounce: false
});

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM