css - How to make a div disappear on hover without it flickering when the mouse moves? -


i've seen answers suggesting display:none on :hover css. makes div flicker when mouse moving.

edit: added jsfiddle

display:none take element out of render tree, loses :hover state immediately, reappears , gets :hover again, disappears, reappears, etc...

what you need is:

#elem { opacity:0; filter:alpha(opacity=0); } 

it leave place empty, no flickering appear. (demo or yours updated)


Comments

Popular posts from this blog

Python __call__ special method practical example -

arrays - jQuery - Retrieve values from HTML elements and return their sum -