Image map by alpha channel

前端 未结 3 1838
傲寒
傲寒 2020-12-16 05:26

Let\'s imagine that circle.png is a 400x400 px transparent background image with a c

3条回答
  •  执念已碎
    2020-12-16 05:55

    You can do this using HTML5 canvas. Draw the image in to the canvas, attach a click handler to the canvas, and in the handler, check if the pixel that was clicked on is transparent.

提交回复
热议问题