Blck
Blck

Reputation: 169

What causes this mouse behavior?

What causes this to happen? (the mouse is not being moved or clicked)

alt text

Upvotes: 5

Views: 226

Answers (4)

dan richardson
dan richardson

Reputation: 3939

It is because you are adding a border on hover.
But because you hover near the top, when the border is added, your cursor goes outside of the element.
Would be best to add

border: 1px solid #FFFFFF;
border-bottom: 0px;

to begin with, in your CSS

Upvotes: 3

Benjol
Benjol

Reputation: 66521

At a guess, the rollover event is adding a border which changes the effective size of the element, so that the mouse is no longer over it, or something like that...

Upvotes: 2

Otávio Décio
Otávio Décio

Reputation: 74250

It's an edge condition.

Upvotes: 8

Richard Ev
Richard Ev

Reputation: 54087

I suspect that the :hover CSS style results in the object having a different size (possibly margin), which causes the :hover CSS style to cease to be applied. This returns the object to its original dimensions, and the :hover CSS style is applied by the browser once more.

The browser can only keep up with this at a certain rate and you see visible flickering.

Upvotes: 13

Related Questions