Div hover not working when scrolling in chrome

耗尽温柔 提交于 2020-01-02 03:46:06

问题


Please take a look at this code: http://jsfiddle.net/6JnJb/1/ My problem is that in chrome, the divs doesn't change their color if the mouse is over them, when scrolling. If I move the mouse over a div 'manually' (not when scrolling) than it changes it's color to red. In Firefox it works perfect, but not in Chrome. Can I solve this problem or simply this how Chrome works?


回答1:


Chrome does not propagate mouseover events right away when scrolling. There really isn't any way around this issue, since it is giving priority to the scrolling event rather than the hover event on a particular element.

The behavior I see is that the hover effect doesn't move with the still mouse on scroll but catches up when the scroll speed is sufficiently low.



来源:https://stackoverflow.com/questions/8927179/div-hover-not-working-when-scrolling-in-chrome

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!