Problems with mouseout event

后端 未结 6 1396
忘了有多久
忘了有多久 2021-02-09 15:11

I\'m using JavaScript to hide an image and show some text thats hidden under it. But, when the text is shown if you scroll over it, it fires the mouseout event on the container,

6条回答
  •  天涯浪人
    2021-02-09 15:26

    I'm not sure if this would fit with the rest of your styling, but perhaps if you changed the css on the text div so it was the same size as the image, or fixed the size of the outer div, then when the mouseover event fired, the size of the outer div wouldn't change so much as to cause the mouseout event.

    Does this make sense?

提交回复
热议问题