开发者

Getting an irregular area in a web page (much like a Java GeneralPath or Polygon)

开发者 https://www.devze.com 2023-01-15 12:16 出处:网络
Is it possible to create an arbitrary shape on a web page so we can detect mouse overs/outs on it? It\'s much like an area map for an image but corresponds to a page (or a div etc) rather than an imag

Is it possible to create an arbitrary shape on a web page so we can detect mouse overs/outs on it? It's much like an area map for an image but corresponds to a page (or a div etc) rather than an image.

This might be a non starter altogether as I haven't found any information i开发者_StackOverflown this area. Thought I'll just ask here to see if there is any way to achieve this.

My original requirement is to provide an area map for a set of images such that one area corresponds to a list of prearranged images so any points in area can be mapped onto a specific image in that list using that image's position.

Any information will be helpful.


There is the <map> HTML element that allows the definition of geometrical primitives and even polygons.

The <area> elements defining the areas inside the map support standard mouseover and mouseout events.

There are javascript-/jQuery-based extensions to even highlight map areas. See this question for more info.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号