本文介绍了jQuery 可拖动和溢出问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我从设置为溢出的容器 div 中拖动 div 时,我产生了不希望的效果:滚动.

I am having an undesired effect when I drag a div from a container div which is set as overflow: scroll.

我找到了其他人遇到问题但我无法找到解决方案的示例

I have found an example of someone else where they have had the issue but I have been unable to find a resolution

粘贴箱示例

发生的情况是滚动只是增加了,如果您想拖动到可滚动 div 内的目的地,我可以理解为什么这将是理想的行为,但我希望能够将其移出滚动控制.

What happens is that the scroll is just increased, I can see why this would be the desired behaviour if you wanted to drag to a destination within the scrollable div but I want to be able to take it outside of its scrolling grasp.

推荐答案

一定要注意文档

http://docs.jquery.com/UI/Draggable#option-scroll

类型:布尔值
默认值: true
如果设置为 true,容器在拖动时自动滚动.

所有进入这里的人,从我的错误中吸取教训,RT(F)M!!!

All who enter here, learn from my mistake, RT(F)M!!!

这篇关于jQuery 可拖动和溢出问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-26 00:51
查看更多