5

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

alt text

7
  • I can't tell what is going on in that screenshot - it is too small Commented Jun 4, 2009 at 12:54
  • Some optical mice, on surfaces like blank sheet of paper, tend to move by themselves back and forth by a few pixels. Not sure if this is the case, but it happens. Commented Jun 4, 2009 at 12:56
  • 3
    It causes the cpu usage of Firefox to spike. Interesting. Commented Jun 4, 2009 at 12:58
  • 1
    It happens to me too. WinXP, Firefox 3. Commented Jun 4, 2009 at 12:59
  • heh. StackOverflow front page, if you position your mouse just right.... Commented Jun 4, 2009 at 13:04

4 Answers 4

13

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.

Sign up to request clarification or add additional context in comments.

Comments

8

It's an edge condition.

1 Comment

isn't it called "Borderline personality" ?! :-)
3

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

1 Comment

just realised it is actually the stack overflow website... doh! :)
2

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...

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.