Make a javascript canvas rectangle clickable

后端 未结 4 1214
夕颜
夕颜 2021-01-16 22:06

I am creating a simple calculator. Here it is. I am almost done with the basic design but I am confused on how to make the buttons clickable? One trick could be to make a di

4条回答
  •  醉话见心
    2021-01-16 22:36

    A possibility would be to use an actual image of a calculator, then you could use HTML map to define where the buttons are.

    Updated: here is an example of map/area in use, similar to the SVG example given elsewhere on this page.

提交回复
热议问题