Hover only on non-transparent part of image

前端 未结 6 661
野性不改
野性不改 2020-12-07 02:25

Is there any way to make only a non-transparent portion of an image to trigger mouse-over event?

If the mouse travels to the transparent area, the mouse-out should b

6条回答
  •  抹茶落季
    2020-12-07 02:51

    You could make a child div with a fixed height to the approximate size of the transparent area, absolutely positioned over it with blank background and border, then add your scripts to acitvate that div, or content within the div.

提交回复
热议问题