html - Click under the links under the transparent area (triangular or polygon link) -
check following code: http://jsfiddle.net/q8ycz
<div style="background-color: red; width: 200px;" onclick="alert('behind')"> <div><a href="test">test test test test test test test test test test test</a></div> <div><a href="test">test test test test test test test test test test test</a></div> <div><a href="test">test test test test test test test test test test test</a></div> <div><a href="test">test test test test test test test test test test test</a></div> <div><a href="test">test test test test test test test test test test test</a></div> <div><a href="test">test test test test test test test test test test test</a></div> <div><a href="test">test test test test test test test test test test test</a></div> <div><a href="test">test test test test test test test test test test test</a></div> <svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="190" style="position: absolute; top: 0; left: 0;"> <polygon onclick="alert('hello')" points="100,10 40,180 190,60 10,60 160,180" style="fill:lime;stroke:purple;stroke-width:5;fill-rule:evenodd;"> </svg> </div>
i have svg polygon. there way can enable links under transparent parts of star.
you use pointer-events. add svg tag:
pointer-events:none
and polygon tag:
pointer-events:fill
see following example in http://jsfiddle.net/poselab/ypwxq/
more information in:
Comments
Post a Comment