悬浮框

1. 右侧底部悬浮框

运行效果图: [http://runjs.cn/code/zvjocat0]

要点:oDiv.style.top=document.documentElement.clientHeight-oDiv.offsetHeight+scrollTop;

 

2. 右侧中部悬浮框

运行效果图:[http://runjs.cn/code/bws1gmne]

要点: oDiv.style.top=Math.ceil((document.documentElement.clientHeight-oDiv.offHeight)/2+scrollTop);

posted @ 2015-06-06 11:31  林大勇  阅读(304)  评论(0)    收藏  举报