jQuery图像映射替代 [英] jQuery image map alternative

查看:98
本文介绍了jQuery图像映射替代的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用图片地图的替代方法是什么?我最近看到一个问题,有人说,为什么人们仍在使用图像映射?并且我想知道一个好的CSS或JavaScript解决方案,看看自己,如果它更好地使用比图像映射。

What is an alternative to using image maps? I saw a question recently and someone said, "Why are people still using image maps?" and I wanted to know a good CSS or JavaScript solution to see for myself if its better to use than an image map.

推荐答案

CSS是使用图像映射时的方式。您可以通过更改左上宽度高度值,轻松地在图像的任何区域放置具有所需宽度和高度的链接。

CSS is the way to go when working with image maps. You can easily position a link with desired width and height over any area of the image by changing top left width height values.

在示例中,将鼠标悬停在婴儿脸上或图像中的红色光线上。要更改锚点的位置,您需要做的是修改#pos1和#pos2的顶部和左侧属性。对于边框的宽度和高度也是如此。所有使用没有javaScript的CSS。

In the example, Hover over the babies face or the red light in the image. To change the position of the anchors all you need to do is modify the top and left properties of #pos1 and #pos2. Same goes for width and height of the bounding box. All done with CSS with no javaScript.

这篇关于jQuery图像映射替代的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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