窗口调整大小后重新计算图像映射 [英] Recalculate image map after window resize

查看:102
本文介绍了窗口调整大小后重新计算图像映射的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个有趣的问题:

我的女朋友(画家......)希望有这样一个网页:

My girfriend (painter...) wants to have a web page like this:


  1. 第一页只是一个图像,通过所有屏幕 - 没有滑块等。因此,存在为不同分辨率调整图像大小的问题。

  2. 在这张图片上有一些窗口,用户可以浏览页面的其余部分。

解决方案:


  1. 因此,对于第一个问题,有一个很好的解决方案 - jquery。它很好用,没问题。

  1. So, for the first problem there is a nice solution - jquery. It works great, no problem.

对于第二个问题,有图像映射,工作正常。

For the second problem, there is image maps, which works fine.

问题:

如何组合第一个和第二个解决方案?我还没有找到解决方案的唯一问题是如何动态计算多边形形状的imagemap坐标。 (即无论屏幕分辨率如何,图像映射属性将始终保持在正确的位置)。

How do I combine the first and second solutions? The only problem I haven't found a solution for yet is how to dynamically calculate imagemap coordinates for a polygonal shape. (ie whatever the screen resolution is, the imagemap properties will always stay at the right spot).

对于矩形形状,我发现这个。聚形状怎么样?

For rectangle shapes I found this. What about poly shape?

有人对如何实现这个有一些想法吗?

Does somebody have some ideas on how to accomplish this?

推荐答案

您可以使用JQuery插件 ImageMapster 获取图像映射。
这个插件可以在resizig之后重新计算区域并具有其他有用的功能。

You can use JQuery plugin ImageMapster for your image-maps. This plugin can dinamically re-count areas after resizig and have other usefull features.

如果你想要编写自己的解决方案,我想要探索代码该插件可以帮助您完成调整大小任务。

And ever if you deside to write own solution, I suppose explore the code of the plugin can help you with your resizing task.

这篇关于窗口调整大小后重新计算图像映射的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆