问题标签 [mousemove]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
jquery - jQuery CrossDomain iframe 鼠标移动功能
我正在使用代码嵌入vimeo视频FULLSCREEN的项目:
我在父页面上使用 Mousemove 功能在 Mousemove 上显示公司徽标,如下所示:
我的问题是浏览器没有检测到嵌入全屏视频的 Mousemove 功能,这就是为什么 Logo div 没有出现......
使用 CSSpointer-events: none;
它可以工作,但禁用了视频播放器控制。
有什么解决办法吗?
谢谢
c# - 在 .NET 中处理受限制的鼠标移动事件
我正在尝试编写一个用户可以通过按住并移动鼠标来绘制的表单。因此,我订阅了 MouseMove 事件并使用给定的 Point 在该点绘制一个像素。
不幸的是,我移动鼠标的速度越快,消息队列跳过和丢弃的点就越多,所以我最终得到的不是笔画的线,而是一系列点。
我需要手动填写每个点之间的空白吗?如果是这样,什么是计算两点之间的点列表的好算法。
c# - 如何在 C# 中的所有按钮的鼠标移动上设置手形光标?
我一直在手动设置每个按钮的事件,但是我该如何概括呢?
我想我可以覆盖 ButtonBase,但我该怎么做呢?我是一个相对较新的 C# 程序员,我需要这个,因为我正在模拟一个真实的设备,所以我需要改变光标,以便用户知道他们可以点击哪里。
javascript - Make jQuery Tipsy tooltip move with mouse
I'm sure this is possible -- and probably very easy -- but I can't figure out how to make it work. How can I make a Tipsy tooltip move horizontally along with the mouse?
When hovering over a Tipsy-enabled element, I want the tooltip to appear at its normal Y position (directly above the element), but instead of having the X position fixed at the center of the element, I want it to be equal to the mouse's X position . To complicate things a bit, I'm trying to have the mousemove function enabled ONLY for elements that have a gravity of 2 characters ('nw', 'ne', 'sw', 'se').
No code to post, as everything I've tried hasn't worked and the plugin is publicly available.
jquery - 为什么此工具提示遵循相反的垂直方向?
我正在使用 Jquery 和 CSS 开发一个“自制”工具提示,
似乎工作正常,
它位于“触发器”元素的顶部(并水平居中),但是当我向上移动鼠标时,它会下降,相反,
我做错了什么?
javascript - jQuery mousemove() In Iphone
i have a question regarding jQuery mousemove() on iPhone. The problem is that it doesn't show the movement on iPhone when touches occur; the events are not working properly in Safari on iPhone.
Can I get any tips of any Javascript plugins to fix this or detect movement on iPhone?
jquery - jQuery/CSS Offset + mousemove 问题
演示: http: //jsfiddle.net/H45uY/6/
我在这里要做的是使鼠标左上角<div>
跟随鼠标。代码在没有段落的情况下可以正常工作(参见上面的演示),但是当您添加段落时,<div>
将向上推并且鼠标位于框的一半下方。为什么段落会这样做?
谢谢!
javascript - Javascript IE鼠标事件仅限于原始收件人?
我有一个在 Chrome 和 FF 中运行良好的信息叠加层。它是一个 div,包含一个表格(用于边框图像布局),然后是一个中心内容 div。我在适当的边框表格单元格上触发 mousedown。
一旦发生这种情况,一个不同的 div 会通过 z-index 被带到前面,并传递 mousemove 和 mouseup 事件来处理拖动信息气泡。一旦 mouseup 被触发,信息气泡会将“事件”div 放回原来的位置。
我也按照相同的过程拖动气泡的右下角来调整它的大小。同样,在 Chrome 和 FF 中工作,但在 IE 中失败。
IE 似乎将事件触发器限制为 info div。如果鼠标设法移动到 div 之外(拖动速度比事件触发/更新更快),则信息覆盖不再接收 mousemove 事件。但是,如果我将鼠标移回覆盖层上(不释放按钮),它会继续接收鼠标事件。
编辑:在创建一些示例代码时(当前的功能被分成几个 JS 模块),它在 IE 中工作。一旦我发现我的示例代码和实际代码之间的差异,我会再次更新。
编辑/回答:(所以不会让新用户在这段时间内回答他们自己的问题......)仍然不确定实际问题是什么。(如果你问我,z-index 为 100 的 div 应该可以正常接收鼠标事件吗?)
我的解决方案是修复我的鼠标事件处理,这样我就可以将我的 mousemove 和 mouseup 附加到父 div(就像一开始就应该做的那样),用于我想要设置的所有拖动/调整大小行为。
问题是由于对事件的新手方法以及在太多位置使用 stopPropagation() 导致我无法采用这种方法。(我希望我的信息框中的文本等可以选择)。
我调整了代码,以便我的文本容器只需要在 mousedown 而不是所有鼠标事件时停止传播。
javascript - 发现相对于恢复的浏览器窗口的鼠标位置
如何发现鼠标相对于可视浏览器窗口的位置?如果您看到下面的屏幕截图,我想确定鼠标相对于浏览器窗口中可视区域的坐标,同时将鼠标悬停在这四个缩略图上。如您所见,我将可视区域的左上角视为 0、0。我想要精确的鼠标位置而不是缩略图的位置,并且我想要实现跨浏览器兼容性。
有什么帮助吗?