Jquery 用保证金还原可拖动项目的位置
我为我的问题设计了一把简化的小提琴。拖动项目时,它会恢复到由边距引起的错误位置。我如何解决这个问题 HTML: JS:Jquery 用保证金还原可拖动项目的位置,jquery,jquery-ui,Jquery,Jquery Ui,我为我的问题设计了一把简化的小提琴。拖动项目时,它会恢复到由边距引起的错误位置。我如何解决这个问题 HTML: JS: PS:对不起,我不知道如何设置代码的样式。放弃cursorAt选项,对拖动辅助对象应用相同的边距 #image, .ui-draggable { cursor: move; margin-top: 50px; } #image{ cursor: move; margin-top: 50px; } $('#image').draggable
PS:对不起,我不知道如何设置代码的样式。放弃
cursorAt
选项,对拖动辅助对象应用相同的边距
#image, .ui-draggable {
cursor: move;
margin-top: 50px;
}
#image{
cursor: move;
margin-top: 50px;
}
$('#image').draggable({
revert: true,
helper:'clone',
cursorAt: {
top: -40
},
});
#image, .ui-draggable {
cursor: move;
margin-top: 50px;
}