How do I highlight parts of an imagemap on mouseover?

后端 未结 5 1053
旧时难觅i
旧时难觅i 2020-12-13 16:08

I need to display an imagemap with about 70 areas in it. The area of the imagemap the mouse cursor is currently at is supposed to be highlighted in a certain color.

5条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-13 16:38

    I don't know if there's a cool way to do it, but you could take your picture as background image of a block element, overlay it with a transparent picture and your image map and then replace this transparent picture on a mouseover event with a picture the area is highlighted in.

    On the downside you'll need 70 images of highlighted areas

提交回复
热议问题