I reproduced the effect in this pen
将鼠标移到灰色区域,并将其保持在那里,即使放手也是如此。您将看到鼠标计数器每秒都在增加。
HTML
<div> Please move your mouse over the red area and then remove your hand from the mouse, see the mouse movement counter increase every second. <br/><span></span></<div>
CSS
div {
position: absolute;
width: 100%;
height: 100%;
background-color: grey;
font-size: 20px;
}
b{
font-size: 30px;
}
JS
mousemovements = 0;
$(function(){
$("div").on("mousemove", function(){
mousemovements += 1;
$("span").html("<b>mouse moved: " + mousemovements+" </b>");
})});
这个bug在firefox 35中不可见