I have basic DOM menu that has sprite background images for the first level of "LI"s. It works just fine, but I 开发者_运维百科guess there is some problem and instead of switching the image right away on hover it goes blank and after about a second the hover image "appears" (shifts).
That happens only on first hovering. After that it's smooth like it's supposed to be. Refresh the page and there it is again... Frustrating... Here is a link to check it out: http://goo.gl/6FAM
The problem exist on Firefox v3.6.3. Chrome 5.0.375 and IE 8.0.7600 don't have this issue.
Any ideas?
It's because the hover background image is not loaded until you pass the mouse on the button.
An easy solution is to use CSS sprites, so you will only have 1 image to deal with.
精彩评论