martes, 9 de febrero de 2010

Floating panel always in the same position

To implement this behavior I call a javascript function in the onScroll event within the body tag. The function looks like this:

document.getElementById("FloatingDiv").style.top=document.body.scrollTop+100;

NOTE: If you are using Mozilla/Firefox, Safari 3 or Chrome you can see the round corners. This is a new CSS3 property (border-radius).

webkit (safari/chrome): -webkit-border-radius
gecko (mozilla/firefox): -moz-border-radius

click here and see how it works!

No hay comentarios:

Publicar un comentario