平移和平移的最佳方式使用 jquery 扫描图像

发布于 2024-08-28 09:10:59 字数 554 浏览 6 评论 0原文

我正在尝试制作图像平移和图像平移扫描系统。我有一个缩放图像的滑块(可以拖动),还有图像角落的小地图(也可以拖动)。 你可以在这里看到一个粗略的例子(抱歉,我不允许使用该设计,所以它没有格式化): http://lighe.madetokill.com/test/test.html

我的问题是虽然它在 Firefox 和 Opera 中工作得很好,但在 chrome、safari 和 IE 中(目前在 IE 中不起作用),除了 100% 之外的任何缩放级别(在 100% 时它是黄油光滑的),它都会卡顿。

webkit性能不佳的原因是什么?我执行这个错误吗?我基本上是在更改图像的 margin-left 和 margin-top 属性。我知道这已经足够快了,因为 100% 时它非常平滑。我使用画布会更好吗?如果可能的话,我试图避免使用 Flash(或任何其他插件)。

另请注意,这是一项正在进行的工作,除此之外还有其他错误,所以不要担心这些:)

提前致谢!

I am trying to make an image pan & scan system. I have a slider that zooms the image (that can be dragged) and also a small map in the corner of the image (that can also be dragged).
You can see a rough example here (sorry, I am not allowed to use the design, so it's not formatted):
http://lighe.madetokill.com/test/test.html

My problem is that although it works great in firefox and opera, it stutters in chrome, safari and IE (it doesn't currently work in IE) at any zoom level except 100% (at 100% it's butter smooth).

What is the reason for webkit's poor performance? Am I implementing this wrong? I am basically changing the margin-left and margin-top properties of the image. I know this is fast enough since at 100% it's perfectly smooth. Would I be better off using canvas? I am trying to avoid flash (or any other plugins) if possible.

Also please note this is work in progress, there are other bugs except this, so do not bother with those :)

Thanks in advance!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

十年不长 2024-09-04 09:10:59

对于任何感兴趣的人来说,canvas 似乎效果很好:)

For anyone interested, canvas seems to work great :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文