图像在拖动时移动 [英] Image gets moved on drag
问题描述
在Chrome中,它可以正常工作,但不是在Firefox中,您可以在 JSFiddle 中看到。
In Chrome it works fine, but not in Firefox, as you can see in the JSFiddle. The problem is that the picture next to player gets moved when the player is dragged.
这里是CSS:
.player {
color: #000;
background-color: rgba(40, 180, 40, 0.8);
padding: 5px;
border: 2px solid #000;
border-radius: 50px;
display: inline-block;
}
如何让它在Firefox中也能正常工作?
How to make it work in Firefox too?
奖金问题:为了保持图片与播放器分离(在两个浏览器中),我在播放器后面使用空格。
Bonus question: In order to keep the picture a little separate from the player (in both browsers), I use a whitespace after the player. It would be nice if I could that with CSS only.
推荐答案
我在FF 40.0.3上遇到这个问题,当你运行你的小提琴以及。可能与jqueryUI中的较旧的错误相关,因为它在元素上设置了显式的宽度/高度当执行拖动时。这个bug似乎在最近几个版本中重新出现了。尝试使用jQueryUI版本1.11.1。
I get this issue on FF 40.0.3 when running your fiddle as well. Is probably related to an older bug within jqueryUI in that it sets an explicit width/height on the element when performing drag. This bug seems to have re-appeared in the last few versions. Try using jQueryUI version 1.11.1.
这篇关于图像在拖动时移动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!