开发者

HTML - Clickthrough Transparent Pixels in PNGs?

开发者 https://www.devze.com 2023-03-23 04:34 出处:网络
While laying out a web开发者_C百科site, I have a png, with a great deal of transparency that I don\'t want to be mouse enabled. Is there any way to detect transparent pixels, and ignore the mouseOver/

While laying out a web开发者_C百科site, I have a png, with a great deal of transparency that I don't want to be mouse enabled. Is there any way to detect transparent pixels, and ignore the mouseOver/mouseDown? If not, does anyone know a good way to fake it?

Thanks in advance.


An image map can be a polygon

http://www.javascriptkit.com/howto/imagemap.shtml

<img src="trees.gif" usemap="#green" border="0">
<map name="green">
<area shape="polygon" coords="19,44,45,11,87,37,82,76,49,98" ...

In addition

With SVG you can fill a polygon with an image and have that polygon be a link. However SVG is not supported by all of the browsers that are in current use. With http://code.google.com/p/svgweb/ you could use SVG to accomplish what you want in a newer fashion.

0

精彩评论

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