在颜色框中有一个直径10px的小圆圈。拖动圆圈选择一种颜色。但我不希望用户在拖动光标之前必须把光标放到10px的圆圈内。如果它们靠近圆圈,比如在圆圈周围30px的正方形内,我想让光标捕捉到圆圈的中心。
我知道你可以用jQuery UI捕捉可拖动对象,但是捕捉光标。似乎有所不同。谢谢你的建议
恶作剧:http://jsfiddle.net/coma/KNnXd/
不要在家里这样做
在颜色框中有一个直径10px的小圆圈。拖动圆圈选择一种颜色。但我不希望用户在拖动光标之前必须把光标放到10px的圆圈内。如果它们靠近圆圈,比如在圆圈周围30px的正方形内,我想让光标捕捉到圆圈的中心。
我知道你可以用jQuery UI捕捉可拖动对象,但是捕捉光标。似乎有所不同。谢谢你的建议
恶作剧:http://jsfiddle.net/coma/KNnXd/
不要在家里这样做