首页 > 代码库 > js把div固定在页面的右下角

js把div固定在页面的右下角

http://www.ablanxue.com/prone_2866_1.html

 

window.parent.onscroll = window.parent.onresize =  window.onload =function () {
  var oFix_box = document.getElementById(‘select-panel‘);
  var oscrollTop = window.parent.document.documentElement.scrollTop || window.parent.document.body.scrollTop;
  oFix_box.style.top = oscrollTop + window.parent.document.documentElement.clientHeight - oFix_box.offsetHeight - 224 + ‘px‘;
  $("#select-panel").stop(true,true).animate({ "top": top1 }, 700);
}