使用jquery根据鼠标坐标移动图像
我正在尝试开发一个 HTML5 白板。我希望用户查看该图板 了解演示者具体指向屏幕内的哪个位置。我能够 使用 这个 jquery 函数收集鼠标移动。
但即使我成功传递了这个值 对于其他使用 php 的客户端,我该如何模拟它? 是否可以移动一个小 指针图像,基于从演示者获得的坐标?
- 是否有任何我无法开始的函数或片段?
- 这是否是普通人可能会遇到的硬件密集型任务? 有问题吗?
- 这是实现我想要实现的目标的最佳方式吗?
I am trying to develop a HTML5 white board. I want the users viewing the board
to know where exactly the presenter is pointing within the screen. I am able to
collect the mouse movements using this jquery function.
But even if i succeed to pass this values
to other clients using php, how can I emulate it? Is it possible to move a small
pointer image, based on the co-ordinates obtained from the presenter?
- Is there any functions or snippets from which I cant get started?
- Will this be very hardware intensive task that normal people may
have issue? - Is this the best way to achieve what I am trying to achieve?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

发布评论
评论(3)
~没有更多了~
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
那么您可以使用
.css
移动图像,例如:
只需将
#image
设置为固定或绝对above
这不是很硬件密集型。只要您使用
.css
而不是.animate
这可能是最简单、最强大的解决方案
Well you can move the image using
.css
such as:
just set
#image
to fixed or absoluteabove
This is not very hardware intensive at all. As long as you use
.css
and not.animate
This is probably the easiest and most robust solution